On this page

Badge

When to use a badge, the status roles, sizes, the state label and tokens.

Draft. Ported from the shadcn-vue Badge and restyled as the Beehexa status label (Color › Usage › Labels). Not yet approved; the API may still change.

A badge is a status label: a short word or two the system sets, such as Synced, Failed or Paused. People read it. They can’t click it, remove it or change it.

When to use

  • A status in a table row, a list or a card, many per screen: size default or lg.
  • The one status a page is about, next to its title: size="state", the solid state label. One per page.
  • To mark something new or in early access: variant="brand".

When not to use

  • For a category or attribute, such as Orders or Staging. That is a tag (Label, tag or chip).
  • For a value people picked and can remove, such as an active filter. That is a chip.
  • For something to click. A badge never looks clickable: no hover, no pointer. Use a Button or a link.
  • For a sentence. Use a message on the page.

Status roles

Variant Role Use for Example
info blue Running and in-progress work Syncing
success green Done, connected, healthy Synced
warning orange Needs attention soon Partial, Token expiring
danger (or destructive) red Failed, blocked Failed
neutral (or secondary) graphite Idle, paused, draft, skipped Paused
brand yellow edge New or early access Early access
default, outline plain A label with no status Draft

Pick the role by meaning, never by the colour you want. Keep the same word for the same status everywhere.

Sizes

Size Height Use
default 20 px (label.height.default) Table rows and lists
lg 24 px (label.height.large) Next to 24 px controls, in cards
state 32 px (label.height.state) The state label: solid fill, one per page

Content

  • One or two words, sentence case, no full stop: “Synced”, “Token expiring”.
  • Say the state, not the action: “Failed”, not “Retry”.
  • On a state label, add an icon that matches the status (Lucide circle-check, circle-x, triangle-alert, info), so the status does not rely on colour.

Tokens

Part Tokens
Label color.border.{role} edge, color.text.{role} text, no fill; neutral uses color.border.bold and color.text.subtle
State label color.background.{role}.bold with color.text.on-bold; neutral uses color.background.neutral.bold with color.text.inverse
Size label.height.default, .large, .state; label.padding.default, .large, .state
Shape radius.050 (4 px corners, not a pill)
Text font.label.small; the state label font.heading.xsmall
Icon size.icon.default, space.050 from the text
  • Table: status in a row.
  • Avatar: a person’s status as a dot.