Introducing PrimeReact v11-alpha 🎉Discover Now

ProgressBar

ProgressBar is a process status indicator.

50%
preview

Installation#

npx shadcn@latest add @primereact/progressbar

Usage#

import { ProgressBar } from '@/components/ui/progressbar';
<ProgressBar value={50} />

Examples#

Basic#

Reflects the completion percentage of an ongoing process.

50%
basic-demo

Dynamic#

Value is reactive so updating it dynamically changes the bar as well.

Uploading Files
0%
dynamic-demo

Formatter#

Custom formatter function to format the display value.

50/100
formatter-demo

Template#

Place ProgressBar.Value where the progress value should be displayed inside the ProgressBar and customize formatter prop to display in different format.

0.0%
0.00 B / 4.88 KB
0% (25s remaining)
Preparing file...
template-demo

Indeterminate#

For progresses with no value to track, set the mode property to indeterminate.

indeterminate-demo

As Steps#

Steps are used to display a progress with multiple steps.

Order Placed
25%
steps-demo

API#

Sub-Components#

See Primitive API for ProgressBarRoot, ProgressBarTrack, ProgressBarIndicator, ProgressBarLabel, ProgressBarValue component documentation.

Hooks#

See Headless API for useProgressBar hook documentation.

Accessibility#

See ProgressBar Primitive for WAI-ARIA compliance details and keyboard support.