Progress
Accent bar that springs to each new value, with an optional label and percentage. Leave out value for an indeterminate sweep (static under reduced motion).
import { Progress } from "@/components/ui/progress";export function UploadProgress({ percent }: { percent?: number }) { // Pass no value while the size is unknown: the bar sweeps instead. return <Progress label="Uploading clip.mp4" value={percent} showValue />;}<Progress>
Accent-colored bar that springs to each new value (scaleX, so no layout work per frame). Indeterminate: a segment sweeps across, the one allowed infinite tween; static under reduced motion.
aria-labelstringAccessible name when there is no visible label.
labelstringVisible label above the bar; also its accessible name.
maxdefault100numberValue at 100%.
showValuedefaultfalsebooleanShow the percentage next to the label.
sizedefault"default""sm" | "default"Bar thickness.
valuenumberOmit for an indeterminate bar (unknown duration).
| Prop | Type | Default |
|---|---|---|
aria-labelAccessible name when there is no visible label. | string | — |
labelVisible label above the bar; also its accessible name. | string | — |
maxValue at 100%. | number | 100 |
showValueShow the percentage next to the label. | boolean | false |
sizeBar thickness. | "sm" | "default" | "default" |
valueOmit for an indeterminate bar (unknown duration). | number | — |
* required. Every component also takes className.