Skip to main content
Skip to design system navigation

BADGE

Source: design-system/components/Badge/Badge.tsx. React Server Component, zero client JavaScript.

Props

PropTypeDefaultRequired
PropvariantType'default' | 'dot'Default'default'Requiredno
PropsizeType'sm' | 'md'Default'md'Requiredno
PropchildrenTypeReactNodeDefaultnoneRequiredyes

Other <span> attributes (id, aria-*, data-*) pass through, and className is appended to the component's own classes.

Variants

OPEN_TO_WORKAVAILABLESMALL

SOURCE

<Badge variant="dot">OPEN_TO_WORK</Badge>
  <Badge variant="default">AVAILABLE</Badge>
  <Badge size="sm">SMALL</Badge>

Below 360px the badge wraps (white-space: normal, flex-wrap: wrap) instead of overflowing.

Accessibility

The dot is aria-hidden; the label text carries the meaning. The pulse animation stops when the motion switch is off.