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>| Prop | Type | Default | Notes |
|---|---|---|---|
intent | neutral | accent | info | success | warning | error | neutral | Soft bg + strong fg |
dot | boolean | false | Leading status dot |
className | string | β | Merged via tailwind-merge |
statusToIntent(status) maps new β info, in_progress/awaiting_review β warning,
submitted/processed β success, error β error, everything else β neutral.
Do / donβt
Section titled βDo / donβtβ- Do use
accent(orange) for at most one brand moment; statuses are system colors. - Donβt invent new colors β extend
statusToIntentinstead. - Donβt rely on color alone; the text label carries the meaning.
Accessibility
Section titled βAccessibilityβ- Text label is the source of truth; the dot is decorative. Verified with
jest-axe.