Progress Bar
- Stable
- WCAG 2.2 evidence
- RTL
Shows how far a task has progressed.
Built on React Aria ProgressBar: role="progressbar" with aria-valuenow, aria-valuemin, aria-valuemax and a
localised aria-valuetext; with isIndeterminate the value attributes are left out and a sweeping segment is shown
(static in the middle of the track under reduced motion, WCAG 2.3.3). Named by label or aria-label (WCAG 4.1.2). Consumer duties: progress is not announced while it changes (WCAG 4.1.3). Announce milestones and completion with
announceStatus() or a LiveRegion, and show a loading bar only after about 300 ms to avoid flicker. Say what the
colour means in text when tone carries a state (WCAG 1.4.1).
import { ProgressBar } from "@nexera-ui/react";- 5
- examples
- 17
- props
- 6
- live controls
- 1
- platform
- 6
- WCAG criteria
- 5
- blocks use it
Try every prop. Copy the code.
Change the props and the code updates. Check light and dark, LTR and RTL, and phone width.
import { ProgressBar } from "@nexera-ui/react";
<ProgressBar />Examples 4
The same examples as Storybook, rendered live. Open Code to copy one.
Indeterminate
Figma Progress bar indeterminate (isIndeterminate): no value is reported. The segment sweeps across the track; with reduced motion it stands still in the middle.
import { ProgressBar } from "@nexera-ui/react";
const sizes = ["sm", "md", "lg"] as const;
const tones = ["brand", "success", "warning", "danger"] as const;
export function Indeterminate() {
return (
<div className="flex flex-col gap-6">
{sizes.map((size) => (
<ProgressBar
key={size}
label="Loading payroll"
labelPosition="top"
size={size}
isIndeterminate
/>
))}
{tones.map((tone) => (
<ProgressBar key={tone} aria-label={`Syncing ${tone}`} tone={tone} isIndeterminate />
))}
</div>
);
}
Custom value text
A custom value text and range: value={4} maxValue={6} valueLabel="4 of 6".
import { ProgressBar } from "@nexera-ui/react";
<ProgressBar
label="Onboarding steps"
value={4}
labelPosition="top"
maxValue={6}
valueLabel="4 of 6"
description="Next: bank details"
/>;
Long content
Labels, values and helper text wrap instead of truncating (translation can add 30 to 40 %).
import { ProgressBar } from "@nexera-ui/react";
<ProgressBar
label="Profile completion for the whole onboarding programme, including contract and documents"
value={35}
labelPosition="top"
valueLabel="7 of 20 sections"
description="Upload the signed contract, your ID and proof of address to finish. You can leave and come back at any time."
/>;
Right to left
Right-to-left: the fill grows from the right, the value moves to the left, numbers use the locale's digits.
import { ProgressBar } from "@nexera-ui/react";
export function RightToLeft() {
return (
<div className="flex flex-col gap-6">
<ProgressBar label="اكتمال الملف الشخصي" labelPosition="top" value={60} />
<ProgressBar label="رفع الملفات" labelPosition="right" value={30} tone="success" />
<ProgressBar aria-label="جار التحميل" isIndeterminate />
</div>
);
}
Props 17
Press "Try it" on a card to load that prop into the playground.
17 props shown
valueLabelNexerastringText shown as the value and announced as aria-valuetext.
Defaults to the percentage formatted for the locale (formatOptions). Not shown while isIndeterminate.
labelPositionNexera"none" | "right" | "top"Where the label and value appear: none shows the track only, right adds the value after
the track, top shows a header with label and value above the track and allows description. Without a visible
label (none, right) the label is still rendered for assistive technology.
sizeNexera"sm" | "md" | "lg"Track height: 4, 8 or 12 px.
toneNexera"brand" | "success" | "warning" | "danger"Fill colour. Colour alone does not tell the state: say "Upload failed" in the label or description
when you use danger (WCAG 1.4.1).
classNameNexerastringExtra classes for the root, merged last so they win over the defaults.
styleNexeraCSSPropertiesInline style for the root.
labelNexeraReactNodeWhat is progressing, for example "Profile completion". Visible with labelPosition="top",
visually hidden but still the accessible name otherwise.
aria-labelNexerastringaria-labelledbyNexerastringdescriptionNexeraReactNodeHelper text under the track, for example "4 of 6 sections done". Shown when
provided, only with labelPosition="top" as in Figma; linked with aria-describedby.
isIndeterminateReact AriabooleanWhether presentation is indeterminate when progress isn't known.
valueReact ArianumberThe current value (controlled).
minValueReact ArianumberThe smallest value allowed for the input.
maxValueReact ArianumberThe largest value allowed for the input.
formatOptionsReact AriaNumberFormatOptionsThe display format of the value label.
idReact AriastringThe element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
aria-describedbyReact AriastringIdentifies the element (or elements) that describes the object.
* Required. React Aria props shown are the ones most apps use; the component accepts the rest of its React Aria props too.
Accessible by default.
Built on React Aria, and covered by the WCAG 2.2 evidence generated on every build.
WCAG 2.2 evidence
2 direct · 4 supporting- 1.3.1Info and RelationshipsLevel A · tested directly
- 1.3.2Meaningful SequenceLevel A · supporting test
- 1.4.10ReflowLevel AA · supporting test
- 1.4.12Text SpacingLevel AA · supporting test
- 2.3.3Animation from InteractionsLevel AAA · supporting test
- 4.1.2Name, Role, ValueLevel A · tested directly
Fits any width.
Nexera components respond to the space they are given. Drag the corner of the frame, or pick a width.
Styling hooks
Pass className to add Tailwind classes (merged last). State is exposed as data attributes, so you can style it with variants like data-pressed:.
<ProgressBar className="shadow-sm" />Used in blocks
- Setup checklistOnboarding
- File uploadForms and data entry
- Task checklistWork and projects
- Project progressWork and projects
- Long-running jobStates and system messages
Related components
- AlertAn inline status message about a section or a task: tone icon, title, optional description, actions and close button.
- BannerA page-wide notice across the top of a page or app shell: tone icon, message, optional link and close button on a solid fill.
- CircularProgressShows progress as a ring with the value in the centre.
- EmptyStateExplains why a list, table or page has no content and what to do next.
- ProgressStepsA segmented progress indicator for a flow with a known number of steps, such as onboarding or a form wizard: a header with "Step 2 of 5" and the step title above one segment per step.
- SpinnerSmall loading indicator.
- SpinnerLabelA spinner with a status message.
- ToastGives the components below it a toast queue through `useToast()` and renders its `ToastRegion`.