ProgressBar
How far a task has got, from 0 to 1; without a value, that work is going on for an unknown time.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
value | number | From 0 to 1. Leave it out while the length of the task is unknown. | |
label | string | Text above the bar, and its accessible name. | |
showValue | boolean | false | Shows the percentage at the end of the label row. |
tone | "primary" | "success" | "danger" | primary | The bar's colour. |
States
| State | Looks like |
|---|---|
determinate | The bar fills to the value. |
indeterminate | A band slides along the track. |
Accessibility
| role | progressbar |
| name | The label prop, or Progress. |
| focus | Never focused. |
| notes | aria-valuenow follows the value; none while indeterminate. |
Theme tokens
color.raised color.primary color.success color.danger color.ink color.muted radius.full space.2 text.caption
Example
<ProgressBar label="Uploading" value={sent / total} showValue />