Theme studio

Design a theme, preview it live, then export it. Saved in this browser.

Quick picks #10b981
Generated scale
50100200300400500600700800900
Some text is below AA

ProgressBar

  • 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";
Loading example…
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.

Loading…
labelPosition
size
tone
label
description
isIndeterminate
Generated code
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.

Loading example…

Custom value text

A custom value text and range: value={4} maxValue={6} valueLabel="4 of 6".

Loading example…

Long content

Labels, values and helper text wrap instead of truncating (translation can add 30 to 40 %).

Loading example…

Right to left

Right-to-left: the fill grows from the right, the value moves to the left, numbers use the locale's digits.

Loading example…

Props 17

Press "Try it" on a card to load that prop into the playground.

17 props shown

valueLabelNexera
string

Text shown as the value and announced as aria-valuetext. Defaults to the percentage formatted for the locale (formatOptions). Not shown while isIndeterminate.

Default –
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.

Default none
sizeNexera
"sm" | "md" | "lg"

Track height: 4, 8 or 12 px.

Default sm
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).

Default brand
classNameNexera
string

Extra classes for the root, merged last so they win over the defaults.

Default –
styleNexera
CSSProperties

Inline style for the root.

Default –
labelNexera
ReactNode

What is progressing, for example "Profile completion". Visible with labelPosition="top", visually hidden but still the accessible name otherwise.

Default –
aria-labelNexera
string
Default –
aria-labelledbyNexera
string
Default –
descriptionNexera
ReactNode

Helper 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.

Default –
isIndeterminateReact Aria
boolean

Whether presentation is indeterminate when progress isn't known.

Default –
valueReact Aria
number

The current value (controlled).

Default 0
minValueReact Aria
number

The smallest value allowed for the input.

Default 0
maxValueReact Aria
number

The largest value allowed for the input.

Default 100
formatOptionsReact Aria
NumberFormatOptions

The display format of the value label.

Default { style: 'percent' }
idReact Aria
string

The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).

Default –
aria-describedbyReact Aria
string

Identifies the element (or elements) that describes the object.

Default –

* 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.

0 px · drag the corner

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:.

Usage
<ProgressBar className="shadow-sm" />

Used in blocks

Related components