A visual indicator showing the completion status of a task or process.
A progress bar built on Base UI's Progress primitive. The root component automatically renders a track and indicator, and you can optionally add a label and formatted value display.
import { Progress, ProgressLabel, ProgressValue } from "@/components/ui/progress"
export default function ProgressDemo() {
return (
<Progress value={60}>
<ProgressLabel>Loading</ProgressLabel>
<ProgressValue />
</Progress>
)
}
import {
Progress,
ProgressTrack,
ProgressIndicator,
ProgressLabel,
ProgressValue,
} from "@/components/ui/progress"<Progress value={50}>
<ProgressLabel>Loading...</ProgressLabel>
<ProgressValue />
</Progress>The Progress root automatically includes a ProgressTrack with a ProgressIndicator inside it. You only need to add ProgressLabel and ProgressValue if you want text above the bar.
<Progress value={60} /><Progress value={45}>
<ProgressLabel>Uploading</ProgressLabel>
<ProgressValue />
</Progress>Pass value={null} to indicate an indeterminate progress state.
<Progress value={null}>
<ProgressLabel>Processing...</ProgressLabel>
</Progress><Progress value={100}>
<ProgressLabel>Complete</ProgressLabel>
<ProgressValue />
</Progress>The root component. Wraps everything in a Base UI Progress.Root and automatically renders a ProgressTrack containing a ProgressIndicator.
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | null | — | The current progress value (0--100), or null for indeterminate. |
className | string | — | |
children | ReactNode | — | Optional label and value elements rendered before the track. |
The background track that contains the indicator. Rendered as a rounded bar with muted background.
| Prop | Type | Default |
|---|---|---|
className | string | — |
children | ReactNode | — |
The filled portion of the track. Width is automatically controlled by the progress value.
| Prop | Type | Default |
|---|---|---|
className | string | — |
A text label rendered with text-sm font-medium.
| Prop | Type | Default |
|---|---|---|
className | string | — |
children | ReactNode | — |
Displays the formatted progress value, right-aligned with tabular number styling and muted foreground color.
| Prop | Type | Default |
|---|---|---|
className | string | — |
children | ReactNode | — |