4.2.0
Core

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.

value 0 — started, no progress
value null — extent unknown

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.

Upload progress56%

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.

Under42%
no tone — the accent, unchanged
Healthy58%
well inside the cap
Warming79%
past the first threshold
At the cap97%
almost out
Informational33%
not a warning at all
Inactive12%
nothing is happening here
Over the weekly cap118%
drawn at 100%, announced as 118, and marked with `data-over-max`
Unknown
indeterminate, and tone-able like the rest

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.

Search — day 18 of 3052% of cap
under the expected pace — expected pace marked at 60%
PMax — day 18 of 3074% of cap
ahead of the expected pace — expected pace marked at 60%

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.

Impression share — Search68%
Lost to budget, Lost to rank
Lost to budget — 20%Lost to rank — 12%
threshold marked at 75%

API Reference

See the Progress API page for every prop of every part, with types, defaults and the contract that pins them.

On this page