Badge

display

Compact label component for status indicators, tags, and counts. Supports a pulsing "live" animation variant.

import { Badge } from '@/components/forge'

Preview

Badge
DefaultSuccessWarningDangerLive

Code Example

Props

PropTypeDefaultRequiredDescription
variant'default' | 'success' | 'warning' | 'danger' | 'accent''default'NoColor variant
dotbooleanfalseNoShows a colored dot indicator
pulsebooleanfalseNoAnimates the dot with a pulsing effect for live status

Variants

defaultsuccesswarningdangeraccent

Accessibility

  • Use aria-label on the parent when badge content alone is not descriptive
  • Pulse animation respects prefers-reduced-motion

Related Components