Progress
How far along a task with a known end is — not a rate, and not a quantity against a cap.
Progress
A task's completeness. Distinct from SpendBar and EngagementBar, which measure a quantity against a declared cap and carry their own status semantics.
Usage
import { Progress } from '@oceanic-hub/brand-system'Reach for it when there is a finish line: an upload, an import, a multi-step
setup. A determinate Progress reads as a promise — it says the task WILL end, and how
close it is — so do not reach for it to show something that fluctuates or has no end state.
Three patterns-tier siblings sit near it and answer a different question. EngagementBar
measures a rate — how often someone engages, with no finish line — and its own note already
points here: a 100 there does not mean "done," and this component is what "done" actually
looks like. SpendBar measures a quantity against a policy-set cap it is told rather
than computes, and FitScore renders a 0–100 score rather than a completion;
neither is a progress bar, and reaching for either to show a finish line would inherit status
semantics that do not belong to a task with a known end. This component is the plain one: a
task is this far along, nothing else.
value={null} is the indeterminate state, and it is a different fact from value={0}:
zero means the task has started and made no progress, null means its extent is not yet
known. Upstream's own arithmetic collapses the two into the same 0% bar; this package keeps
them visually and semantically distinct, because "started, no progress" and "started, unknown
how much" are different things to tell a reader. When there is no task and no extent at all —
just a request in flight — the mark is Spinner, not a bar with nothing in it.
There is no ProgressLabel or ProgressValue part. getValueLabel is Radix's
aria-valuetext hook — it replaces the announced value when a percentage would mislead
("4 of 10 files" is the fact, not "40%"). It is not a name: this component asserts
role="progressbar" and sets no aria-label, so pass one, or aria-labelledby pointed at
the visible label beside it. That VISIBLE label and value are composed beside the bar with plain
markup, the same way Questionnaire's own step count already does it.
RTL is not supported — recorded in pairings.json under direction: nothing in this
package has ever been laid out or measured right-to-left, and upstream ships an RTL example
where the fill direction itself flips.
Indeterminate is a different fact
value={null} means the work has started and its extent is unknown. Upstream's arithmetic renders that as a 0% bar — identical to "started, made no progress". These are two facts, so they get two appearances: the empty track alone, plus data-state="indeterminate" on the root.
With a label
There is no ProgressLabel or ProgressValue part — compose the fact beside the bar with plain markup, the same way Questionnaire's own step count does it. getValueLabel is Radix's aria-valuetext hook, not an accessible name: it replaces the announced value, so the bar still needs an aria-labelledby pointed at the words beside it.
Controlled
Drive the bar from a Slider instead of a fixed number — the composition upstream shows, translated to our own Slider rather than Base UI's.
A tone on the fill, and a value above its max
tone drives the fill from a caller's tier. The doctrine puts status colour in pills, dots and METERS, so a bar is one of the three places a tone belongs — and without it a meter cannot say the one thing a meter is for. Omit it and the fill is brand, exactly as before. A quota 118% used is genuinely 118%, and a bar cannot be 118% wide. Those are different facts, so they are drawn from different numbers: the bar clamps to full, aria-valuenow carries the real value, and data-over-max marks the state. Read the last bar with a screen reader — it announces 118 while drawing 100.
Pacing bar
target draws a marker at a value — here, where spend is expected to be partway through the billing period. The bar carries no opinion about whether that is good: the caller compares value to the mark and passes the tone the comparison earns, the same D30a discipline SpendBar's capState already argues for cap state.
Threshold meter, with an annotated split
target marks the threshold; segments stack the labeled remainder after the indicator — the impression-share shortfall split into what is lost to budget and what is lost to rank. Every segment carries a label, so the split reads even to someone who cannot tell the two fills apart: the visible legend below is the caller's composition, and the component also announces the same labels to a screen reader on its own.
API Reference
See the Progress API page for every prop of every part, with types, defaults and the contract that pins them.