Progress
Show how much of an operation has completed.
Installation
pnpm dlx shadcn@4.18.0 add @siteplane/progressComplete the one-time setup first. Registry JSON lists source files and dependencies.
Usage
import { Progress } from "@/siteplane/components/progress";
<Progress value={40} aria-label="Upload progress" />;Composition
Progress
├── ProgressLabel
├── ProgressValue
└── ProgressTrack
└── ProgressIndicatorLabel and value
Supplying children replaces the automatic track. Include Track and Indicator explicitly.
Range and formatting
Values and formatting belong to the root. This example counts megabytes instead of percentages and adds the total to the displayed value.
Circular progress
ProgressCircle is a separate, self-contained component; it takes a value and no children.
Smooth value changes
The indicator moves evenly toward each new value using the existing --motion-duration-linger token (380 ms by default). Incoming updates can continue an active transition. Numeric and accessible progress values reflect the actual value immediately.
The circle uses --motion-duration-slow. OS and kit reduced-motion settings disable these transitions, so the bar and the circle then jump to each new value. The application still owns the real progress; the component does not simulate uploads or generate additional progress values. The examples on this page stand in for a real upload with a timer: a new value every few hundred milliseconds, a rest at the end and a fresh start.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
Progress. | sm | md | lg | xl | provider / lg | Root size inherited by Label, Track and Value. |
Progress. | string | en-US | Explicit kit formatting default; not automatically the locale provider. |
Progress. | ReactNode | Track with Indicator | Custom children replace the automatic track. |
Label / Track / Value. | sm | md | lg | xl | root / provider / lg | Override the part size. |
ProgressLabel associates the visible label; ProgressTrack contains ProgressIndicator; ProgressValue formats the current root value; a function child receives the formatted and the raw value. Indicator has no owned props. All styled parts accept string className. Root receives value, min, max, format and accessibility labels from Base UI Progress; those numerical and formatting contracts are inherited, not separate Siteplane UI APIs. Pass value={null} for an indeterminate bar when completion is unknown; a fill then runs from the start of the track again and again. With reduced motion the bar and the circle hold still, as a segment in the middle of the track and an arc on top of the circle.
ProgressProps, ProgressLabelProps, ProgressTrackProps and ProgressValueProps export these same size extensions. ProgressPrimitive is the foundation namespace.
ProgressCircle
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | null | required | Numeric completion; non-finite values use min. null shows an indeterminate circle. |
min / max | number | 0 / 100 | Range; visual percentage clamps to 0–100 and is zero for a non-positive range. |
size | sm | md | lg | xl | provider / lg | Circle sizes 20, 28, 32 and 40 CSS pixels respectively. |
locale | string | en-US | Formatting locale. |
ProgressCircleProps omits children, size and value from the foundation Root props and defines its own size and value. With value={null} an arc travels around the circle while completion is unknown.
Usage notes
The application owns timing, cancellation and failures. Keep the accessible label stable as the value changes; use a separate message for a failure or completion that needs an announcement.