Components · Data

Status chip

A compact, persistent label for the state of one thing. It never interrupts, never demands a response, and — because it borrows the alarm palette — is the component most easily misused into meaning something it does not.

Stable · v1.0 shadcn/ui IEC 60601-1-8 WCAG 2.2 AA

Overview

A status chip states what something is. An Alert Banner states what has changed and asks for a response. The distinction matters because they can carry identical colours, and a clinician who learns to scan past chips will scan past a banner rendered to look like one.

The rule that keeps them separable: a chip is never the first place a clinician learns something urgent. It echoes a state established elsewhere — in a worklist row, on a card, beside a value. If a chip is carrying news, it should have been a banner.

Echoing

A chip reflects state that has a source of truth somewhere else. It never originates a clinical signal, and it is never the only place a priority appears.

Worded

The word is the signal; the colour is reinforcement. A chip that has been truncated to its fill has stopped being a chip.

Quiet

Process state — draft, queued, synced — gets no colour at all. Spending an alarm hue on a workflow status devalues it everywhere else.

Anatomy & variants

Clinical priority · echoes an alarm level
Critical Urgent Advisory Reviewed Confirmed

Identical hues and identical words to Alert Banner. A chip may only use these when it is echoing an actual alarm state on that record.

Process state · deliberately colourless
Draft Queued Analysing Archived Superseded Awaiting serial ECG

Nothing here is about the patient's condition, so nothing here is coloured. Distinguished by border weight and text, which survives greyscale.

VariantMeansPermitted for
critical · urgent · advisory Echo of an IEC alarm priority on this record Only when an alarm at that priority exists and is reachable in one action
infoA completed, non-alarm clinical state "Reviewed", "No acute pattern"
okA clinician action succeeded "Confirmed", "Cath lab notified"
neutralProcess state, no clinical meaning Draft, queued, analysing, awaiting input
quietInactive or historical Archived, superseded, expired
The misuse this component invites

Amber is the most requested chip colour in every product, for things like "Pending review" and "Needs attention". Amber is the IEC medium-priority alarm hue. Spending it on workflow status means that when a real medium-priority alarm appears beside it, the two are indistinguishable at a glance. Process state takes neutral, every time. The component enforces this: urgent without a linked alarm fails lint.

Chips go stale

Because a chip echoes state held elsewhere, it can be wrong in a way a banner cannot — the underlying condition changes and the chip continues to assert the old value. In a queue rendered once and left on a screen for twenty minutes, that is a silent use error.

Do
Status unknown

Source unreachable. Says so, rather than showing a value that was true eleven minutes ago.

Don't
Reviewed

Last known value, rendered with full confidence, while the feed is down. Indistinguishable from a current fact.

Chips are not buttons

A status chip is text. It is not a control, it does not respond to hover, and it is not focusable. The one exception is a filter chip — a genuine toggle that removes rows from view — and that is a different component with different rules, because anything that hides a patient is subject to the disclosure requirements in Data grid.

Writing the label

In context

Chips inside a worklist row and a card
Priority indicator Patient State Finding
HARLAND, A. Critical STEMI pattern — anterior V2–V4
OKONKWO, B. Urgent Awaiting serial hs-troponin rising

Troponin

Analysing
47 ng/L
drawn 14:41 · ref < 34 ng/L

Row two carries a priority chip and a process chip side by side — coloured and colourless, clearly different kinds of claim.

Do's and don'ts

Do
Draft Queued Awaiting serial

Process state gets no colour. The alarm palette keeps its meaning for alarms.

Don't
Draft Queued Awaiting serial

Workflow status in the IEC medium-priority hue. A real Urgent alarm beside these is now invisible.

Do
Status unknown

Source unreachable, so the chip says so rather than asserting a value from eleven minutes ago.

Don't
Reviewed

Last known value rendered with full confidence while the feed is down. Indistinguishable from a current fact.

Accessibility

Outcomes of use

What this contributes to, in the terms of Usability & context of use. These are attributes believed to contribute to an outcome; the outcome itself is settled by observing real use in a specified context, not by this page.

Clinical safety notes

Risk controls carried by this component

Trace these in your risk file (ISO 14971) and usability engineering file (IEC 62366-1).

Implementation

$ npx shadcn@latest add https://md.notjustany.tech/r/status-chip.json
const statusChipVariants = cva(
  "inline-flex items-center gap-1 rounded-sm border px-1.5 py-0.5 " +
  "text-xs font-bold uppercase tracking-wide whitespace-nowrap",
  {
    variants: {
      status: {
        // alarm echoes — require `alarmRef`
        critical: "bg-alarm-critical text-alarm-critical-foreground",
        urgent:   "bg-alarm-urgent text-alarm-urgent-foreground",
        advisory: "bg-alarm-advisory text-alarm-advisory-foreground",
        info:     "bg-alarm-info text-alarm-info-foreground",
        ok:       "bg-alarm-ok text-alarm-ok-foreground",
        // process state — no clinical meaning, no clinical colour
        neutral:  "bg-muted text-foreground border-input",
        quiet:    "bg-transparent text-muted-foreground border-input",
      },
    },
    defaultVariants: { status: "neutral" },
  }
)

// An alarm hue may only be spent on an actual alarm.
const ALARM_STATUSES = ["critical", "urgent", "advisory"] as const

if (ALARM_STATUSES.includes(status) && !alarmRef) {
  throw new Error(
    "[StatusChip] alarm statuses require `alarmRef` — the alarm this chip echoes. " +
    "Use status=\"neutral\" for process state."
  )
}
PropTypeDefaultNotes
status critical | urgent | advisory | info | ok | neutral | quiet neutralDefaults to colourless deliberately.
alarmRefstring Required for alarm statuses. Throws without it.
observedAtstring Timestamp of the state being echoed, for staleness handling.
unknownbooleanfalse Renders quiet + "Unknown" when the source is unreachable.
NotJustAnyMed.Tech Design System · Status chip · v1.0 · draft for review
Reference applications named in this system are fictional; all patient data shown is fabricated.