Skip to main content

Badge

Atombeta@macaw-ds/ui · since 0.1.0

A short, non-interactive status label such as Paid, Overdue or Draft. Not a button, not a counter.

Contract

From the manifest's a11y block: what assistive technology sees, and every key the component handles.

Role
none (a span with text)
Focusable
No. Interactive children keep their own focus.
Accessible name
The text content. A badge has no role; it reads as part of the surrounding text.
Notes
  • Every tone pairing meets 4.5:1 for text in both themes.
  • Colour reinforces the word; it never replaces it. "Overdue" in critical, not a red dot alone.
  • Badges are not interactive. For a filter chip or a removable tag, a different component is needed (not in the system yet).
Keyboard
KeysBehaviour

Not interactive; no keyboard handling.

Motion

This component does not animate or transition, so there is nothing to reduce.

Contrast

Computed at build time from the token values, against the background each colour is paired with.

TokenOnLightDark
status.success-fgstatus.success-bg9.23:1 AAA11.70:1 AAA
status.success-solid-fgstatus.success-solid7.34:1 AAA7.56:1 AAA
status.warning-fgstatus.warning-bg8.69:1 AAA11.91:1 AAA
status.critical-fgstatus.critical-bg9.38:1 AAA11.09:1 AAA
status.info-fgstatus.info-bg9.04:1 AAA11.54:1 AAA
status.neutral-fgstatus.neutral-bg12.74:1 AAA14.20:1 AAA
status.accent-fgstatus.accent-bg9.47:1 AAA11.54:1 AAA