Spinner
Alignment target:@astryxdesign/core v0.7.1 · Spinner
Loading
<Spinner
label="Loading"
size="lg"
shade="default"
/>Spinner Props #
| Name | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Ring diameter: 10px, 14px, 18px, or 28px. |
shade | 'default' | 'subtle' | 'onMedia' | 'inherit' | 'default' | Color shade for light backgrounds, dark backgrounds, or inherited text color. |
label | string | — | Text shown below the spinner. Also used as the accessible name. |
Slots #
label: rich content below the spinner. Replaces thelabelprop text. With no visible text and noaria-label, the accessible name follows the locale: Loading in English, 加载中 in Simplified Chinese.
Theme #
CSS
.my-spinner {
--astryx-spinner-color-accent: #0074e2;
}--astryx-spinner-diameter-{sm|md|lg|xl}: ring diameter per size.--astryx-spinner-stroke-width-{sm|md|lg|xl}: stroke width per size.--astryx-spinner-arc-fraction: fraction of the ring covered by the moving arc.--astryx-spinner-color-accent: arc color for thedefaultshade.--astryx-spinner-color-subtle: arc color for thesubtleshade.--astryx-spinner-color-track: track color for thedefaultandsubtleshades.--astryx-spinner-color-on-dark: arc and track color for theonMediashade.--astryx-spinner-group-gap: space between the ring and the label.--astryx-spinner-label-color: label text color.