Progress
Progress bar indicator for determinate or indeterminate operations. Reach for progress when a task has a measurable duration or completion percentage the user benefits from seeing. Omit value to render an indeterminate bar for operations without a known duration.
Usage
When to use
- Long-running operations with a known completion percentage
- File uploads or downloads
- Multi-step flows where overall progress is meaningful
When not to use
- Stepped or ordered progress between named stages - use the Steps component
- Brief operations under half a second - use nothing
- Indeterminate loading for a specific area - use the Loading component
Do
- Provide accessible min/max/now values
- Use determinate progress when progress can be measured
- Keep progress visible while the operation runs
Don't
- Hide progress the moment it completes without user feedback
API
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Accessible label applied via aria-label. |
value | number | - | Current progress value. Omit for indeterminate state. |
max | number | - | Maximum value. |
classes | array | - | Additional CSS class words merged into the root element. |
attributes | object | - | Additional HTML attributes spread on the root element. |
Classes
| Class | Capability | Default | Description |
|---|---|---|---|
.info | Intent | - | Informational message. |
.warning | Intent | - | Warning or caution. |
.danger | Intent | - | Error, destructive, or critical. |
.success | Intent | - | Confirmation or completion. |
.sm | Size | - | Small. |
.md | Size | Yes | Medium. |
.lg | Size | - | Large. |
.animated | Motion | Yes | Honors the animations option. |
.still | Motion | - | Forces motion off regardless of the option. |
Examples
Determinate
Bar that fills to a given percentage.
Indeterminate
Animated bar for operations without a known duration.
Accessibility
- WCAG 2.2 AA
- Determinate progress is exposed to assistive technology with min, max, and current values
- Indeterminate progress omits the current value so assistive technology announces the "busy, unknown duration" state