Progress Bar

Loading...

Installation

Add the component with the CLI.

npx shadcn@latest add @intentui/progress-bar

Manual installation

Install the dependencies, then copy the component source into your project.

npm install cn

Anatomy

import { Description, Label } from "@/components/ui/field"
import {
  ProgressBar,
  ProgressBarHeader,
  ProgressBarTrack,
  ProgressBarValue,
} from "@/components/ui/progress-bar"
<ProgressBar value={value}>
  <ProgressBarHeader>
    <Label>Loading…</Label>
    <ProgressBarValue />
  </ProgressBarHeader>
  <ProgressBarTrack />
  <Description>This is an example of a progress bar indicating 50% completion.</Description>
</ProgressBar>

Examples

Indeterminate

Use an indeterminate progress bar when the completion percentage is unknown.

Loading...

Component API

ProgressBar

ProgressBar extends the React Aria Components <ProgressBar> component.

classNamestring

ProgressBarHeader

ProgressBarHeader extends the native <div> element.

classNamestring

ProgressBarTrack

ProgressBarTrack extends the native <div> element.

classNamestring

ProgressBarValue

ProgressBarValue extends the native <span> element.

classNamestring

See the React Aria for the full API reference.

Design