Spinner
Circular progress indicator, indeterminate or showing a value, with optional text.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
value | number | undefined | undefined | Progress between `0` and `max`. Leave unset for an indeterminate spinner. |
max | number | 100 | Value that fills the whole ring. |
label | string | — | Accessible name when nothing is slotted. Defaults to "Loading". |
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-spinner--size | pixel | 24px | Diameter of the ring. |
--c2-spinner--stroke-width | pixel | 4px | Thickness of the ring, in the ring's 48-unit box; it scales with the size. |
--c2-spinner--stroke-linecap | stroke-linecap | round | `butt` for square arc ends. |
--c2-spinner--color | color | #0265dc | Colour of the moving arc. |
--c2-spinner--animation-duration | time | 1.4s | One indeterminate cycle; also the determinate transition length divided by two. |
--c2-spinner--gap | pixel | 8px | Space between the ring and the text. |
--c2-spinner--flex-direction | flex-direction | row | `column` puts the text under the ring. |
--c2-spinner__track--color | color | #e4e4e7 | Colour of the full ring behind the arc; `transparent` hides it. |
--c2-spinner__label--color | color | #71717a | |
--c2-spinner__label--font-size | font-size | 14px | |
--c2-spinner__label--font-weight | font-weight | — | |