Components
Progress Bar
A bar that fills smoothly to its value.
<ProgressBar label="Uploading report.pdf" value={64} />Installation
npx shadcn@latest add https://ui.zjkm.tech/r/progress-bar.jsonimport { ProgressBar } from "@/components/progress-bar"Using JavaScript? Set tsx: false in components.json and the CLI converts it.
New to shadcn? Run npx shadcn@latest init first. The CLI needs components.json and the @/ import alias.
Usage
A labelled bar that glides to each new value, with the percentage beside the label. It's a progressbar with its value, so screen readers can report it.
import { ProgressBar } from "@/components/progress-bar";
export function Upload({ sent, size }: { sent: number; size: number }) {
return <ProgressBar label="Uploading report.pdf" value={sent} max={size} />;
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | Progress so far. | |
max | number | 100 | The total. |
label | string | Accessible name, also shown. | |
showValue | boolean | true | Shows the percentage. |
color | string | "#6366f1" | Fill colour. |
className | string | Classes for the wrapper. |
With reduced motion, the bar jumps to each value.