Component
Vue Spinner Component
<DomSpinner>A compact loading indicator for buttons, toolbars, inline rows, and pending states.
Playground
Try every prop live
Spinner playground
Adjust the props to explore sizing, content, and behaviour.
Saving
Properties
Control props
Screen reader label.
Spinner size.
Spinner foreground colour when no custom foreground is provided.
CSS color for the stationary donut track. Defaults to a tint of the foreground.
CSS color for the spinning arc. Overrides tone when provided.
Playground.vuevue
Install
npm install @getdom/studiovue
<script setup>
import '@getdom/studio/style.css';
import { reactive } from 'vue';
import { DomSpinner } from '@getdom/studio';
const data = reactive({
"label": "Saving",
"size": "md",
"tone": "primary",
"background": "color-mix(in oklab, var(--warning) 20%, transparent)",
"foreground": "var(--warning)"
});
</script>
<template>
<DomSpinner
v-bind="data"
/>
</template>Reference
Props
Control props
| Name | Type | TS | Default | Description |
|---|---|---|---|---|
label | string | string | 'Loading' | Screen reader label. |
size | 'sm' | 'md' | 'lg' | string | 'md' | Spinner size. |
tone | 'primary' | 'neutral' | 'success' | 'warning' | 'danger' | string | 'primary' | Spinner foreground colour when no custom foreground is provided. |
background | string | string | '' | CSS color for the stationary donut track. Defaults to a tint of the foreground. |
foreground | string | string | '' | CSS color for the spinning arc. Overrides tone when provided. |
Auto-generated from Spinner.props and inline _edit hints.