Loading...
Controls
<ProgressBar>
<Label>Loading...</Label>
<ProgressBarControl />
</ProgressBar>Installation
npm
pnpm
yarn
bun
npx shadcn@latest add @dotui/progress-barUsage
Use progress bars to show the progression of a system operation or task.
import { ProgressBar, ProgressBarControl } from '@/components/ui/progress-bar'<ProgressBar value={60}>
<ProgressBarControl />
</ProgressBar>Anatomy
ProgressBar wraps ProgressBarControl (the track) and an optional ProgressBarOutput that renders the value as text.
import {
ProgressBar,
ProgressBarControl,
ProgressBarOutput,
} from '@/components/ui/progress-bar'
;<ProgressBar>
<ProgressBarOutput />
<ProgressBarControl />
</ProgressBar>Value
value is measured against minValue and maxValue, which default to 0 and 100. When progress can't be measured, set isIndeterminate.
<ProgressBar minValue={50} maxValue={150} value={100}>
<ProgressBarControl />
</ProgressBar>Value formatting
Pass formatOptions (an Intl.NumberFormat config) to format the value ProgressBarOutput renders, or replace the text entirely with valueLabel.
<ProgressBar formatOptions={{ style: 'currency', currency: 'JPY' }} value={60}>
<ProgressBarOutput />
<ProgressBarControl />
</ProgressBar>Examples
Default
File Upload Progress
- 2m 30sdocument.pdf
- 45spresentation.pptx
- 5m 12sspreadsheet.xlsx
- Completeimage.jpg
With Progress Label
Loading75%
API Reference
ProgressBar
Progress bars show either determinate or indeterminate progress of an operation over time.
| Prop | Type | Default | |
|---|---|---|---|
ReactNode | function | — | ||
boolean | — | ||
number | 0 | ||
ReactNode | — | ||
NumberFormatOptions | { style: 'percent' } | ||
ProgressBarControl
ProgressBarOutput
A progress bar output displays the current value of the progress bar as text.
Supports all span attributes.
| Prop | Type | Default | |
|---|---|---|---|
Last updated on 7/7/2026