Badge

Frond
Static labels and counts. Neutral by default; status hues only when the badge is the status.
LiveBeta12

Usage

The import, then a use to start from. Both copy as they are.

Import
import { Badge } from "@/components/ui/Badge";
Example
<Badge variant="neutral">Beta</Badge><Badge variant="outline" size="xs">12</Badge><Badge variant="success" dot>Live</Badge>

When to use

Use it for

  • Short, static labels: a plan, a count, a tag. One or two words.
  • neutral or outline by default. A status hue (success, warning, error, info) only when the badge is the status.
  • dot adds a colored dot; dot="spinner" marks something in progress.

Avoid

  • System state such as live, publishing or failed: use StatusBadge, which owns the label and the copy.
  • Anything clickable. A badge is a label; use a Button or a link.
  • Color for emphasis on a heading. Badges carry information.

Accessibility

Checks

  • The words carry the meaning; the hue only reinforces them.
  • A count reads with its noun nearby (12 sites), not as a bare number.

API

Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.

Badge

PropValues
variant"neutral""info""success""warning""error""primary""purple""outline"
size"xs""sm""md"
dot"spinner"
VariantsNeutralInfoSuccessWarningErrorVariantPrimaryPurpleOutlineWithDotWithSpinnerExtraSmallMediumAll

Keep going

Color
Semantically named colors and a set of ramps for the full palette. Optimized for light and dark.