Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Info Progress for React

A progress bar at 60 percent in the info color, on a tinted track, for routine work in the background.

A bar at 60 percent. The fill is the info color, and the track is a lighter tint of it. No label is shown.

Use the info color for routine background work, so it does not look like an error or a success. A Spinner fits the same work when you cannot measure it. In React, Base UI does not move the bar on its own.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.
Use email insteadNo credit card

Anatomy

Progress anatomy: root, label, value, track, indicator

Usage

<Progress
  aria-label="Sync progress"
  className="w-full max-w-md **:data-[slot=progress-indicator]:bg-info *:data-[slot=progress-track]:bg-info/20"
  value={60}
/>

FAQ

How is the bar colored?

With classes on Progress, since it has no color prop. **:data-[slot=progress-indicator]:bg-info colors the fill, which sits inside the track. *:data-[slot=progress-track]:bg-info/20 tints the track.

Why the info token and not a palette color?

info is a theme color, so it follows light and dark mode and any theme you switch to. A class like bg-green-500 stays the same everywhere.

Does 60 pick the color?

No. value only sets the amount; the color classes apply at any value. Change them yourself when the state changes, such as when an upload fails.

What is the accessible name?

aria-label on Progress, Sync progress. The demo has no visible label, so without it a screen reader would announce a bar with no name.

Can the color carry the meaning on its own?

No. The color isn't announced, and not everyone can tell colors apart. Say what it means in words beside the bar, such as Upload failed or Storage almost full.

How do I update the 60?

Change value as the work advances. This demo passes a fixed 60.

API Reference

Progress

Sets aria-label="Sync progress" and value={60}. The rest is on the Progress page.