Progress Bar

A progress bar shows the progression of a task.

Loading...
<ProgressBar>
  <Label>Loading...</Label>
  <ProgressBarControl />
</ProgressBar>

Installation

npx shadcn@latest add @dotui/progress-bar

Usage

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

  • document.pdf
    2m 30s
  • presentation.pptx
    45s
  • spreadsheet.xlsx
    5m 12s
  • image.jpg
    Complete

With Progress Label

Loading75%

API Reference

ProgressBar

Progress bars show either determinate or indeterminate progress of an operation over time.

PropType
ReactNode | function
boolean
number
ReactNode
NumberFormatOptions

ProgressBarControl

The visual track for the progress bar.

Supports all div attributes.

PropType

ProgressBarOutput

A progress bar output displays the current value of the progress bar as text.

Supports all span attributes.

PropType

Last updated on 7/7/2026