StatusPill
The one status vocabulary every product shares — reach for it instead of a hand-rolled badge, or two surfaces end up disagreeing about what "done" means.
The three axes
One vocabulary per question — a task, a standing condition, a quantity against a ceiling — landing on the same three tones so a row of them reads as one system. `axis` and `status` are all-or-nothing, and a status only type-checks against its own axis, which is what stops a cap word leaking into a task pill at compile time rather than in review. Each axis has its own section below.
Usage
import { StatusDot, StatusPill } from '@oceanic-hub/brand-system'Composition
Use the following composition to build a StatusPill:
StatusPill
StatusDotThis is the component that makes two different products feel like one company, so
resist reaching for a bespoke badge. There is no shadcn original for this one — the nearest
relative is Badge, and it is orientation only, never a page to copy: a Badge carries no status
vocabulary, no axis validation and no in-flight affordance, and every surface that reached for
one anyway is exactly how a health pill ended up reading "Done" and a cap pill "Healthy" — the
two entries the anti-drift checklist names by name. Reaching for Badge here is the drift this
component exists to close, not a smaller version of the same job.
axis and status are all-or-nothing and a status only type-checks against its own axis,
which is what stops a cap value leaking into a task pill at compile time rather than in
review. The axes share zero vocabulary: task (done / working / stuck), health (healthy /
needs-attention / at-risk), cap (under / near / over). A surface driving a render lifecycle
instead of one of those — draft / queued / rendering / ready / error — passes
renderStatus, which is a separate, component-local vocabulary that resolves through its own
map onto the same three tones; it is not a fourth axis, and axis+status wins over it if a
caller (wrongly) supplied both.
inFlight is orthogonal to tone: a queued pill is in-flight and info, a rendering
one is in-flight and working, and the same pill at rest uses the same tones — in-flight is
about whether work is happening, tone is about what it means. Under
prefers-reduced-motion the halo goes and the hollow ring stays — the animation stops, the mark
persists — because the ring itself carries the state, not just the motion around it.
Only soft renders the dot at all, so inFlight is a no-op on solid. Note that
neutral is a tone, not a variant: a soft neutral pill — the default — has a dot like any
other, and inFlight animates it.
Task
Reach for task when the subject is a unit of work with a lifecycle — a run, an import, a review — and the pill supplies the canonical word so two products cannot spell it differently. Never for how something is standing rather than progressing: a health pill reading "Done" is the first entry on the anti-drift checklist.
Health
Reach for health when the subject is a standing condition with no finish line — an account, an integration, a relationship — where the question is how it is doing, not how far along it is. Never for a job: a run reaches "Done", it never becomes "Healthy", and the type system refuses the crossing rather than leaving it to review.
Cap
Reach for cap when a quantity is measured against a ceiling — spend, seats, a quota — and the three words are the same under / near / over a SpendBar states, so the pill beside the meter and the meter agree. Never for how something is doing: a cap pill reading "Healthy" is the second entry on the anti-drift checklist.
Soft and solid
soft is the default and the one to reach for in a list, where a column of filled chips reads as alarm; solid is for the single pill a screen is about. Only soft draws the dot, so inFlight compiles on solid and changes nothing on screen.
Tones without an axis
tone is the raw layer under the three axes: five roles and your own words, for a label the shared vocabularies have no entry for. Reach for it only there — using it to re-say a task, health or cap state in wording of your own is precisely the drift the axes exist to close, and it is the one crossing the types cannot catch.
In flight
Pass inFlight while work is actually happening, so a queued scene does not read exactly like a stopped one. It is orthogonal to tone — the dot goes hollow and pings, whatever the pill means — and it degrades the package's way: the animation stops, the mark persists, so reduced motion drops the halo and keeps the ring.
The render lifecycle
renderStatus is a component-local vocabulary that resolves through its own map onto the same three tones — it is not a fourth axis, and axis plus status wins over it if a caller supplies both. It resolves the tone only, so unlike an axis pair it hands you no word: the label is the caller's.
The mark, without the pill around it
StatusDot is the dot StatusPill draws, exported. Reach for it where a chip does not fit: a master column where the row is the record, a step list whose row is already coloured (a chip inside it is a box in a box), a live indicator whose other half is not a status at all. There is one implementation of the in-flight geometry and the pill consumes it, so a tuned halo can never drift from a copy. tone is optional — omitted, the mark paints in currentColor, which is how the pill uses it. Unnamed it is aria-hidden; give it an aria-label and it becomes an image, which is what a bare mark in a cell has to be.
| Run | Duration | |
|---|---|---|
| wave-3 · ticket 4 | 4m 12s | |
| wave-3 · ticket 3 | 11m 48s | |
| wave-3 · ticket 2 | 2m 03s |
Inherits the colour around it
The dense row scale
size="sm" is the micro pill a table row needs. Row height is not a taste question: at ~18px of row content a 24px chip pushes the row taller, which changes how many records fit on a screen. The dense treatment is Badge's — mono, text-[10px], uppercase, tracked — so a micro pill and a micro badge in one row are not two idioms, and the radius steps down with the box because an 8px corner on a 20px pill reads as a lozenge. The dot and the in-flight ring scale with it. It sits flush beside NativeSelect size="sm" and Input size="sm", which is the whole point of the axis being the same word in all three.
| Run | State | Cost |
|---|---|---|
| ticket 4 | Running | €0.42 |
| ticket 3 | Merged | €1.08 |
| ticket 2 | Bounced | €0.11 |
API Reference
See the StatusPill API page for every prop of every part, with types, defaults and the contract that pins them. It also documents statusPillVariants, CAP_STATUS_LABEL, HEALTH_STATUS_LABEL, RENDER_STATUS_TONE and TASK_STATUS_LABEL — exported alongside the parts, and signatures rather than props.