ui · Primitive
Progress
@devalok/shilp-sutra/ui/progressView in Storybook Hand-curated previews ship in rolling waves. See it live in Storybook →
Reference
Props
value: number (0-100) — omit for indeterminate
size: "sm" | "md" | "lg" (track height)
color: "default" | "success" | "warning" | "error" (indicator color)
autoColor: boolean (auto-shifts color by value: 0-59=default, 60-84=warning, 85-100=success, >100=error)
showLabel: boolean (shows percentage text)
indicatorClassName: string
Defaults
size: "md"
color: "default"
Example
<Progress value={75} color="success" showLabel />
<Progress size="sm" /> {/* indeterminate */}
Composability
- Radix Progress underneath —
value(determinate) or absent (indeterminate). Standard ARIA: role=progressbar, aria-valuenow/min/max. - autoColor semantic signal: Maps value thresholds to color so consumers don't have to manually compute: 0–59=default, 60–84=warning, 85–100=success, >100=error. Useful for storage meters, budget trackers, goal progress.
- Indeterminate: Omit
valueto get a continuous animated indeterminate bar. Use for unknown-duration loads. - Progress vs ProgressRing: Progress is a linear bar (horizontal). ProgressRing is circular. ProgressRing offers multi-ring stacked variants; Progress doesn't.
- Inside Card/StatCard: StatCard has a
progressprop that renders a thin inline version — use that inside StatCards instead of a separate Progress.
Gotchas
- Omit value (or pass undefined) for indeterminate animation
autoColoroverridescolorwhenvalueis set — do not pass both unless you want autoColor to win
Changes
v0.29.0
- Added
autoColorprop — automatically shifts indicator color based on value thresholds (0-59 default, 60-84 warning, 85-100 success, >100 error)
v0.1.0
- Added Initial release with
size,color,indeterminatevariants and optional label slot