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.jsonUploading report.pdf
Determinate and indeterminate
Uploading design.fig
Preparing export
import { Progress } from "@/components/sheenui/progress/progress";
// Package build (after the first npm release, or a packed tarball): import { Progress } from "@sheenui/theme";
export function Example() {
const value = 64; // 0 to 100
return (
<>
<Progress label="Uploading design.fig" value={value} />
<Progress label="Preparing export" value={null} />
</>
);
}Files to copy
3 folders · 1 file · 3 packages
- From
theme/src/ components/progress/lib/cn.tsstyles/
- 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
Videos
Documents
Waiting for the server
import { Progress } from "@/components/sheenui/progress/progress";
// Package build (after the first npm release, or a packed tarball): import { Progress } from "@sheenui/theme";
export function Example() {
return (
<div className="flex w-full max-w-sm flex-col gap-5">
<Progress label="Photos" value={100} />
<Progress label="Videos" value={42} />
<Progress label="Documents" value={7} showValue={false} />
<Progress label="Waiting for the server" value={null} />
</div>
);
}Props
Keyboard
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
Related pages
67 components pages in all: browse them on All components.
By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .