Badge

Display

A compact status indicator for labeling, classifying, or highlighting elements.

Preview

Badge

Props API

PropTypeDefaultDescription
labelstring"Badge"The badge text content
variantselect"default" | "success" | "warning" | "error" | "info" | "outline""default"Color variant conveying semantic meaning
sizeselect"sm" | "md""md"Size of the badge
dotbooleanfalseAdds a colored dot indicator before the text

Usage

Use semantic variants to communicate status at a glance: "success" for live/active, "warning" for pending/attention, "error" for failed/critical, "info" for neutral context. Avoid stacking multiple badges next to each other.

Accessibility

  • Rendered as a <span> — surrounding context must convey the badge meaning.

  • When color alone communicates status, add a visually hidden text alternative.