Skip to content

React Progress Bar

A glass React progress bar with an accent fill and a sweep of light, plus an indeterminate mode for loading states.

npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/progress.json
Uploading report.pdf
x

Determinate and indeterminate

Uploading design.fig
x
Preparing export
x

Files to copy

3 folders · 1 file · 3 packages
From theme/src/
  • components/progress/
  • lib/cn.ts
  • styles/
shadcn CLI
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/progress.jsonRegistry item: progress. The styles need the Tailwind v4 glass UI setup.
Packages
pnpm add @base-ui/react clsx tailwind-merge

Several tasks with labels

Each bar has its own name. The value is read to screen readers; showValue also prints it.

Photos
x
Videos
x
Documents
x
Waiting for the server
x

Props

PropTypeDefaultDescription
value (required)number | nullNoneA number from 0 to max. Pass null for an indeterminate (loading) bar.
maxnumber100The value that means "done" (value is read against it).
labelReactNodeNoneText above the bar, also its accessible name.
showValuebooleantrueShow the percentage on the right.
localeIntl.LocalesArgumentthe browser'sSets the BCP 47 locale of the percentage ("18%" or "18 %").
classNamestringNoneAdds extra classes to the outer element.

Keyboard

KeysAction
TabNot focusable: Progress is a read-out, not a control.

Accessibility

  • Base UI renders role="progressbar" with aria-valuenow, aria-valuemin and aria-valuemax; label names it.
  • value={null} is indeterminate: no aria-valuenow, so it is announced as busy rather than as a percentage.
  • The track and fill keep 3:1 contrast against the surface. Under reduced motion the fill jumps to each new value and the indeterminate bar becomes a still, half-tone bar.

When to use Progress

  • Use Progress as an animated progress bar for a file upload or an import job where the total is known, showing the percentage on the right and a label like Uploading report.pdf above the bar.
  • Use it for a multi-step setup wizard, passing value and a max equal to the number of steps so the bar fills as each step completes.
  • Use value null for an indeterminate bar while a request has no known length, which Base UI exposes without aria-valuenow so screen readers do not read a false number.
  • Skip it when the number is a measurement against a range, such as disk space or password strength, where Meter fits. Use Spinner for tiny waits and Skeleton for content shapes.
  • Pair it with Button to start or cancel the task, Toast for completion, and DataTable progress cells to show per-row status in a long list.

Frequently asked questions

67 components pages in all: browse them on All components.

By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .