← Components/primitives

Tag

Carbon-spec Tag. Used for categorical metadata (labels, filters, statuses). Four variants × ten color tones × three sizes.

primitivesstablea11y: untested2/3 coverageEdit on GitHub ↗
primitives-tag--defaultOpen all variants →

When to use

  • Categorical metadata on lists / cards / rows ("Computer vision", "Active", "v2").
  • Filter chips a user can toggle (selectable) or dismiss (dismissible).
  • Status indicators where the label needs colour and text together.

When not to use

  • Counts or unread markers → use `Badge`. Tags carry textual meaning; Badges signal magnitude.
  • Single-toggle UI → use `Toggle` or `Switch`. selectable Tag is for many-of-many filters, not a binary state.
  • Inline destructive actions on a Tag → use `IconButton` next to it.