Components · Data Display

Badge

A small label for a status or category.

Automated a11y scan passing Element: <span>

Component Workbench

Switch between the live interactive preview, syntax-highlighted implementation code, copyable AI coding agent prompt, and designer anatomy blueprint.

Badge · Canonical Spec
Healthy Rebalancing Degraded v2.4.1 Internal

When to use it

Do

  • Keep the text to one or two words.
  • Use the same variant for the same status everywhere.

Don't

  • Make it clickable. Use Button instead.
  • Rely on color alone. Always include text.

Accessibility & Keyboard Interaction

Requirements for using this component accessibly, following the W3C ARIA Authoring Practices Guide.

Interaction / KeyBehavior & Compliance Requirement
Non-Color-AloneConveys state via explicit text labels (WCAG 1.4.1).
ContrastPasses 4.5:1 text contrast in both themes.

Tokens

Values update with the current theme.

RoleTokenCurrent value
Success Text--as-semantic-color-status-success-text
Warning Text--as-semantic-color-status-warning-text
Critical Text--as-semantic-color-status-critical-text
Esc
↑↓ navigateEnter openEsc close