Atoms

Progress

A progress bar indicator.

shadcn/ui
Docs

Installation#

npx shadcn@latest add @formance/progress

Install the following dependencies:

npm install radix-ui

Copy and paste the following code into your project.

Update the import paths to match your project setup.

Usage#

import { Progress } from '@/components/ui/progress'
<Progress value={72} />

Examples#

Indeterminate#

Omit value when you do not know how much work remains. The bar then shows a segment that slides in a loop. When the user prefers reduced motion, the segment stays in place and pulses slowly.

Set value={0} to show an empty bar for work that has not started.

<Progress aria-label="Importing transactions" />

API reference#

Progress#

PropTypeDefaultDescription
valuenumber | null | undefined-The progress, from 0 to max. Omit it for an indeterminate bar.
maxnumber100The value of a full bar.
classNamestring-More classes for the track.

The root and the indicator have data-state: indeterminate, loading or complete.