Skip to content

Status badge

A compact label for state. Presentational and SSR-safe β€” render it server-side with no hydration. statusToIntent() centralizes the work-item status β†’ color mapping so the inbox’s hardcoded status classes can migrate onto tokens.

neutralaccentinfosuccesswarningerror
newin progressawaiting reviewsubmittederrorarchived

The first row is the six intents; the second maps real work-item statuses through statusToIntent().

import StatusBadge, { statusToIntent } from '@repo/ui/StatusBadge';
<StatusBadge intent="success">Submitted</StatusBadge>
<StatusBadge intent={statusToIntent(item.status)} dot>{item.status}</StatusBadge>
PropTypeDefaultNotes
intentneutral | accent | info | success | warning | errorneutralSoft bg + strong fg
dotbooleanfalseLeading status dot
classNamestringβ€”Merged via tailwind-merge

statusToIntent(status) maps new β†’ info, in_progress/awaiting_review β†’ warning, submitted/processed β†’ success, error β†’ error, everything else β†’ neutral.

  • Do use accent (orange) for at most one brand moment; statuses are system colors.
  • Don’t invent new colors β€” extend statusToIntent instead.
  • Don’t rely on color alone; the text label carries the meaning.
  • Text label is the source of truth; the dot is decorative. Verified with jest-axe.