Skip to content

Badge

A small pill for a count or a status — live, draft, failed, 12 — in the same intents and fills as the button, or as a dot.

  • .aparte-badge
On this page
Open

.aparte-badge is a status or a count in a pill. It has the button’s two axes: an intent says what it means, a fill (--solid, --soft, --outline) how loudly. --sm and --lg size it, and --dot is the third form: no label, a coloured dot, always solid.

VariableDefault
--aparte-badge-font-sizevar(--aparte-font-size-2xs)
--aparte-badge-gapvar(--aparte-space-1)
--aparte-badge-paddingvar(--aparte-space-1) var(--aparte-space-2)
--aparte-badge-radiusvar(--aparte-radius-full)
--aparte-badge-min-widthvar(--aparte-space-8)
--aparte-badge-dot-sizevar(--aparte-space-4)
--aparte-badge-intent—
--aparte-badge-intent-ink—
--aparte-badge-on-intent—

.aparte-badge · .aparte-badge--danger · .aparte-badge--dot · .aparte-badge--info · .aparte-badge--lg · .aparte-badge--neutral · .aparte-badge--outline · .aparte-badge--primary · .aparte-badge--secondary · .aparte-badge--sm · .aparte-badge--soft · .aparte-badge--solid · .aparte-badge--success · .aparte-badge--warning

  • A badge is text, read where it sits. A --dot has no text: give it role="img" and an aria-label, or a visually hidden word, since its colour alone says nothing to someone who cannot see it. An aria-label alone on a <span> is not read: a span has no role to name.
  • Tag — a chip that can be removed.
  • Button — the intents and fills a badge shares.