Lynx

Notification Badge

아이콘이나 텍스트에 새로운 알림 또는 읽지 않은 항목이 있음을 표시하는 컴포넌트입니다.

Engine ≥ 3.6
사용 가능 버전@seed-design/[email protected], @seed-design/[email protected]

Installation

npm install @seed-design/lynx-react @seed-design/lynx-css

Lynx NotificationBadge는 별도 Registry 컴포넌트 없이 @seed-design/lynx-react 패키지에서 직접 제공합니다.

Usage

Lynx 예제를 불러오는 중입니다.

NotificationBadgePositioner를 알림을 표시할 요소 안에 배치합니다. 부모 요소에는 position="relative"를 지정해야 합니다.

size="large"는 최대 4자의 알림 수를 표시할 때 사용합니다. size="small"은 라벨 없이 알림의 존재만 나타냅니다.

작은 배지는 시각적인 장식으로 숨기고, 함께 사용하는 버튼이나 메뉴에 읽지 않은 상태를 설명하는 접근성 이름을 제공하세요.

Props

Prop

Type

style?CSSProperties | undefined
children?React.ReactNode
className?string | undefined

Prop

Type

style?CSSProperties | undefined
children?React.ReactNode
className?string | undefined

웹 버전과의 차이

Lynx 버전은 HTML <span> 대신 native <text><view>를 렌더링합니다. HTML attribute와 asChild는 제공하지 않으며, native 접근성 속성과 bind* 이벤트를 사용합니다.

Last updated on

목차