Progress
Linear progress bar, indeterminate or filling to a value, with an optional label and count.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
value | number | undefined | undefined | Progress between `0` and `max`. Leave unset for an indeterminate bar. |
max | number | 100 | Value that fills the whole track. |
label | string | — | Accessible name when nothing is slotted. Defaults to "Loading". |
show-value | boolean | false | Show the completed percentage beside the label. Always on when the `value` slot has content. |
CSS custom properties
Grouped by the element and state they target. Click a group to collapse it; click a name to copy it.
| Name | Type | Default | Description |
|---|---|---|---|
--c2-progress--height | pixel | 8px | Thickness of the track and the indicator. |
--c2-progress--width | pixel | 100% | Width of the bar; the host is a block by default. |
--c2-progress--border-radius | border-radius | 999px | Rounding of both the track and the indicator. |
--c2-progress--animation-duration | time | 1.4s | One indeterminate cycle; the determinate fill takes half of it. |
--c2-progress--gap | pixel | 8px | Space between the label row and the track. |
--c2-progress__track--background-color | color | #e4e4e7 | Colour of the unfilled track. |
--c2-progress__indicator--background-color | color | #0265dc | Colour of the filled part. |
--c2-progress__label--color | color | #71717a | |
--c2-progress__label--font-size | font-size | 14px | |
--c2-progress__label--font-weight | font-weight | — | |
--c2-progress__value--color | color | #18181b | |
--c2-progress__value--font-size | font-size | 14px | |
--c2-progress__value--font-weight | font-weight | 500 | |