Examples
Determinate and indeterminate
Use a value when the amount of completed work is known, and null while the duration or total is unknown.
Uploading report65%
Preparing export
Determinate upload and indeterminate export progress
import { Progress } from "@phuctech/ui/components/progress";
export function Example() {
return (
<div className="grid w-full max-w-lg gap-5">
<Progress label="Uploading report" value={65} showValue />
<Progress label="Preparing export" value={null} />
</div>
);
}
Try the props
Switch between a known amount and an indeterminate task; the displayed number follows the progress value.
Uploading report65%
Progress property playground
import { Progress } from "@phuctech/ui/components/progress";
export function Example() {
return <Progress label="Uploading report" value={65} showValue />;
}When to use
Use Progress when a task has a useful measurable range. Use null for an indeterminate task. Progress only renders presentation; the feature owns task state and update timing.
Usage
import { Progress } from "@phuctech/ui/components/progress";
<Progress label="Uploading report" value={65} showValue />API
Tokens
Accessibility
- The component exposes
progressbarsemantics, min/max bounds, and a current value when determinate. - It has a task-specific accessible name. Keep textual status nearby when the precise percentage matters.
Do and don’t
Do
Use a stable range and report the same value to the user and the component.
Don’t
Show a made-up percentage when completion cannot be estimated.