Progress Bar
Linear progress indicator with determinate and indeterminate modes, sizes, color variants, and an optional label and percentage.
Preview
<ProgressBar value={68} label="Uploading" showValue={true} /> Variants
<ProgressBar value={60} variant="primary" />
<ProgressBar value={60} variant="success" />
<ProgressBar value={60} variant="warning" />
<ProgressBar value={60} variant="danger" /> Sizes
<ProgressBar value={50} size="xs" />
<ProgressBar value={50} size="sm" />
<ProgressBar value={50} size="md" />
<ProgressBar value={50} size="lg" /> Label & indeterminate
Add a label (and showValue for the percentage) above the track. Indeterminate mode runs a looping translate animation when the completion is unknown.
<ProgressBar value={40} label="Processing" showValue={true} variant="warning" />
<ProgressBar mode="indeterminate" label="Loading…" /> API
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | 0 | Progress, clamped to 0–100. Ignored in indeterminate mode. |
mode | 'determinate' | 'indeterminate' | 'determinate' | Determinate fill vs a looping indeterminate animation. |
size | 'xs' | 'sm' | 'md' | 'lg' | 'md' | Track height (2 / 4 / 8 / 12px). |
variant | 'primary' | 'success' | 'warning' | 'danger' | 'primary' | Fill color intent. |
label | string | '' | Optional text shown above the track; also used as the accessible label. |
showValue | boolean | false | Shows the percentage next to the label (determinate only). |
Accessibility
- Renders
role="progressbar"witharia-valuemin="0"andaria-valuemax="100". aria-valuenowis set in determinate mode and omitted while indeterminate.aria-labelfalls back to "Progress" when nolabelis provided.
Theming surface
Every public token this component reads, extracted from its source at build time.
The Resolves to column walks each token's real lineage —
component → semantic → primitive → raw value — so you
can see exactly where re-pointing it lands. A spoke re-skins by overriding these in
its theme-<slug>.css; component internals are never edited. No
hook for what you need? File it with /request-lego.
| Token | Tier | Resolves to |
|---|---|---|
--progress-bar-fill-bg | component | #46a758 via --color-primary → --color-grass-9 |
--progress-bar-height-lg | component | 12px |
--progress-bar-height-md | component | 8px |
--progress-bar-height-sm | component | 4px |
--progress-bar-height-xs | component | 2px |
--progress-bar-radius | component | 9999px via --radius-full |
--progress-bar-track-bg | component | #f0f0f0 via --color-surface-sunken → --color-gray-3 |
--color-danger | semantic | #e5484d via --color-red-9 |
--color-success | semantic | #bdee63 via --color-status-success → --color-lime-9 |
--color-text-primary | semantic | #202020 via --color-gray-12 |
--color-text-secondary | semantic | #646464 via --color-gray-11 |
--color-warning | semantic | #ffc53d via --color-status-warning → --color-yellow-9 |
--spacing-100 | primitive | 0.25rem |