Component

Badge

Badges attach a concise status label or numeric count to another element. Use Badge for short text tags and NumberBadge for counts — both render six semantic variants from the --components-badge-tag-* tokens.

Storybook
Playground
Kind
Variant
Size
Label
Leading dot
Dismiss icon
Preview
Badge Label
JSX
<Badge
  variant="primary"
  size="sm"
  label="Badge Label"
  showLeftIcon
  showRightIcon
/>

Props

The full BadgeProps API (text / label badge). Props marked Required have no default.

PropTypeDefaultDescription
variant
'primary' | 'error' | 'warning' | 'success' | 'information' | 'neutral''primary'Badge intent — controls the color tokens.
size
'sm' | 'md' | 'lg''sm'Height and typography scale. 'sm' uses L1 12px; 'md'/'lg' use B2 14px.
label
string'Badge Label'Text shown inside the badge (1–3 words). Truncates on overflow.
showLeftIcon
booleantrueShow the leading 8px dot indicator (decorative).
showRightIcon
booleantrueShow the trailing dismiss (close) control.
onDismiss
() => voidCalled when the dismiss control is activated.
className
stringLayout-only classes (margin, positioning).

Props

The full NumberBadgeProps API (circular numeric badge).

PropTypeDefaultDescription
variant
'primary' | 'error' | 'warning' | 'success' | 'information' | 'neutral''primary'Badge intent — controls the color tokens.
size
'xs' | 'sm' | 'md' | 'lg''xs'Diameter (20 / 24 / 28 / 36px) and typography scale.
support
'default' | 'subtle''subtle''default' = solid fill on white text; 'subtle' = light fill on tinted text.
label
string'9' / '9+' / '99+' (by size)Numeric text, e.g. "9", "9+", "99+". Defaults per size; pass an empty string for a pure dot indicator.
className
stringLayout-only classes (margin, absolute positioning over an icon/avatar).