Content
- Name the work and its subject: Sending to Bore 12.
- Use help for what happens next, such as time left.
- Give an error its cause and the fix.
How far a job with a known end has got, or how full a reading is, with the figure always there as text.
Move the level: the figure changes at once and the fill catches up.
<WildProgressBar
label="Tank 2 · North Pump"
:value="12400"
:max="20000"
unit="L"
show-value="percent"
size="md"
help="Pump running · full in about 42 min."
/>Label, value, track and fill, and a help line. Only the track is required.
Four heights. Label, value and help stay 12px at every size.
Tone says what the work is doing.
For readings. Two thresholds, as percentages of the range, set the colour.
Percent, fraction or your own words. A screen reader hears the same words.
Queued, moving, waiting and done.
A screen reader hears the label and the value in words, even when the value is hidden. Indeterminate has no value. An error is announced when it appears.
| Key | What it does |
|---|---|
| Tab | Passes over the bar. It never takes focus. |
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | — | Progress, in your own units. |
| min | number | 0 | Start of the range. |
| max | number | 100 | End of the range. |
| label | string | — | Visible and accessible name. |
| show-value | 'percent' | 'fraction' | false | false | What the header shows. |
| value-text | string | — | Your own words. Wins over show-value. |
| unit | string | — | Appended to the fraction. |
| size | 'xs' | 'sm' | 'md' | 'lg' | 'md' | 4, 6, 8 or 12px tall. |
| tone | 'brand' | 'success' | 'warning' | 'error' | 'neutral' | 'auto' | 'brand' | Auto colours by thresholds. |
| thresholds | { warning, error } | { warning: 80, error: 40 } | Percentages of the range. |
| layout | 'stacked' | 'inline' | 'stacked' | Header above, or all on one line. |
| help | string | — | The line under the bar. |
| error | string | — | Turns it red; replaces help. |
| striped | boolean | false | Moving stripes. md and lg only. |
| animated | boolean | true | Fill-in, eased changes and moving stripes. |
| indeterminate | boolean | false | A wait with no figure. |
| aria-label | string | — | Name when there’s no label. |
| Token | Value | Where it lands |
|---|---|---|
| --global-blue-1000 | #1877F2 | Brand fill. |
| --global-neutral-grey-300 | #F1F1F1 | The track. |
| --global-green-800 | #019939 | Success fill. |
| --global-green-900 | #018030 | Complete value and tick. |
| --global-squash-1000 | #9D6508 | Warning fill, value and icon. |
| --global-red-800 | #E12121 | Error fill, value and message. |
| --global-neutral-grey-900 | #7F7D83 | Neutral fill. |
| --global-neutral-grey-1000 | #4F4D55 | Label and help line. |
| --global-neutral-grey-1300 | #0A090B | Value. |
| --duration-slowest | 500ms | Fill-in on mount. |
| --duration-moderate | 200ms | Every change after that. |