Lynx

Badge

An informational component that displays status or properties with short text.

Engine ≥ 3.6
Available since@seed-design/lynx-react@0.2.0, @seed-design/lynx-css@0.2.0

Installation

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

Lynx Badge is provided directly from the @seed-design/lynx-react package without a separate ui:badge snippet.

Usage

Loading Lynx example…

Props

Prop

Type

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

Examples

Truncating Behavior

Badge truncates long text and displays ellipsis.

Loading Lynx example…

Tones and Variants

Neutral

Loading Lynx example…

Brand

Loading Lynx example…

Informative

Loading Lynx example…

Positive

Loading Lynx example…

Warning

Loading Lynx example…

Critical

Loading Lynx example…

Web Version Differences

Lynx Badge uses the same size, variant, and tone variant surfaces as React Badge, but has the following differences due to rendering platform differences:

  • Rendering Elements: Renders native <view> root and <text> label instead of HTML <span>.
  • Public Surface: Provided as package exports like React, and does not provide a Lynx-specific ui:badge snippet.
  • ref Forwarding: You can pass ref to the root <view> with React.forwardRef.
  • Event Handling: Badge is a static information display component, so no separate interaction props are added.
  • Polymorphic Rendering: Web's asChild / HTML span attribute surface is not provided in Lynx.

Table of contents