Data display
Progress
Show how far along a task or utilisation figure sits, from 0 to 100. For usage against an entitlement limit, use Entitlement progress.
Purpose
Progress is determinate: it needs a value. When the wait has no known length, use
Spinner.
Always name what is progressing with label (or point aria-labelledby at visible text). The bar
renders role="progressbar", which WCAG requires to have a name — without one, a screen reader
announces only a bare percentage.
Example
Structure
The tokens behind the bar.
| Property | Value |
|---|---|
| Track | 8px tall (h-2), full width, --secondary fill |
| Indicator | --primary fill |
| Radius | pill (rounded-full) |
| Motion | transition-transform — the indicator slides between values |
Best practices
Do
- Name every bar —
labelfor screen readers, and visible text beside it when sighted users need the figure too. - Show the number when precision matters; a bar alone reads as "roughly two thirds".
- Use Entitlement progress for usage against a benefit limit — it pairs the bar with the amounts for you.
Don't
- Use
Progressfor waits of unknown length — that is Spinner's job. - Animate a value you are not measuring; fake progress erodes trust the moment it stalls.
- Stack several unlabelled bars — each needs its own name.
Accessibility & keyboard
- Radix supplies
role="progressbar"witharia-valuemin,aria-valuemaxandaria-valuenow— the value is announced as a percentage. - A progressbar must have an accessible name. The
labelprop becomesaria-label; when the name already exists as visible text, passaria-labelledbypointing at it instead — the component then omitsaria-labelso the two never conflict. - The default name is a generic "Progress" — override it with something specific ("Dental entitlement used") so multiple bars on one page stay distinguishable.
- Colour is not the only signal: the announced value carries the meaning, and any visible figure should sit in real text next to the bar.
- Keyboard: none — the bar is non-interactive and never receives focus.
Props
Progress also accepts the Radix Progress root props (value, max, getValueLabel) and any
HTML attribute.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | undefined | "Progress" | Accessible name for the bar. Radix renders `role="progressbar"`, which WCAG requires to have a name — without one, a screen reader announces only a percentage with no indication of what is progressing. Override the default with something specific ("Dental entitlement used", "Upload progress"), or pass `aria-labelledby` to point at visible text. |
asChild | boolean | undefined | — | — |
value | number | null | undefined | — | — |
max | number | undefined | — | — |
getValueLabel | ((value: number, max: number) => string) | undefined | — | — |