Components

Progress

The shadcn/ui Progress bar with a spring-animated indicator and an indeterminate loading state — plus three animated React progress blocks built with Motion and Radix: a circular progress ring with a counting number, a multi-step stepper and a segmented progress bar for chunked uploads.

  • Drop-in shadcn API
  • Radix Progress
  • Spring physics
  • prefers-reduced-motion

Installation

$ npx shadcn@latest add https://duskui.com/r/progress.json

Replaces components/ui/progress.tsx with the same API, plus indicatorClassName. Following Radix, a missing or null value now means indeterminate; pass value={0} for an empty bar.

Usage

upload-status.tsx
import { Progress } from "@/components/ui/progress"

export function UploadStatus({ percent }: { percent: number }) {
  return <Progress value={percent} aria-label="Upload progress" />
}

Examples

Default

The bar fills in from empty when it mounts and springs to every new value, so quick jumps settle naturally instead of snapping. Use the buttons to change it.

Syncing files18%

Indeterminate

When you don't know how long something will take, pass value={null} and a highlight sweeps across the track. Radix sets data-state="indeterminate" and leaves out aria-valuenow.

Preparing your export…

Blocks

Ready-made variations composed from the base component with Motion. Each installs on its own and pulls in its dependencies automatically.

Circular Progress

An SVG ring that springs to its value while the number in the middle counts along. Both are driven by one spring motion value, so they never drift apart and React doesn't re-render per frame. Recolor it with text-* classes on the indicator and track.

$ npx shadcn@latest add https://duskui.com/r/circular-progress.json
PropTypeDefaultDescription
valuenumber—Current value, 0 to max. Required.
maxnumber100Maximum value.
sizenumber120Diameter in pixels.
strokeWidthnumber10Ring thickness in pixels.
showValuebooleantrueShow the counting number.
formatValue(value: number, max: number) => string—Formats the number. Defaults to a whole percentage.
captionReactNode—Small text under the number.
indicatorClassName / trackClassNamestring—Classes for the arc and the track (use text-*).

Stepper Progress

A stepper for onboarding, checkout or any multi-step form. Connectors fill with a spring as you advance, finished steps draw a check mark and the current step is outlined. Set current to steps.length to mark everything complete.

  1. Account (completed)
  2. Workspace (current step)
  3. Invite (not started)
  4. Launch (not started)
$ npx shadcn@latest add https://duskui.com/r/stepper-progress.json
PropTypeDefaultDescription
steps(string | { title: string; description?: string })[]—The steps, in order. Required.
currentnumber—Index of the step in progress; earlier steps are complete. Required.
labelstring"Progress"Accessible name for the list.

Segmented Progress

A bar split into segments that fill one after another, for chunked uploads, quotas or checklists. A single spring drives the whole bar and each segment takes its slice of it, so the fill flows from segment to segment.

Uploading video.mp43/8 chunks
$ npx shadcn@latest add https://duskui.com/r/segmented-progress.json
PropTypeDefaultDescription
valuenumber—Current value, 0 to max. Required.
maxnumber100Maximum value.
segmentsnumber—Segment count. Defaults to max when it's 12 or less, otherwise 10.
segmentClassName / indicatorClassNamestring—Classes for each segment's track and fill.

API Reference

Same as shadcn/ui: a single Progress component that forwards the Radix Progress props.

PropTypeDefaultDescription
valuenumber | null—Current value. null or undefined shows the indeterminate sweep.
maxnumber100Maximum value.
getValueLabel(value: number, max: number) => string—Text for aria-valuetext. Defaults to a percentage.
indicatorClassNamestring—Classes for the moving bar, e.g. a different color.

Accessibility

  • Built on Radix Progress: role="progressbar" with aria-valuemin, aria-valuemax, aria-valuenow and a readable value text.
  • Give every bar a name with aria-label or aria-labelledby pointing at its visible label.
  • The circular ring's counting number is hidden from screen readers; the progressbar value is announced instead.
  • Stepper Progress is an ordered list with aria-current="step" and each step's state (completed, current, not started) spelled out.
  • Under prefers-reduced-motion bars, rings and segments jump to their value and the indeterminate sweep becomes a pulse.