Component

Vue Spinner Component

<DomSpinner>

A compact loading indicator for buttons, toolbars, inline rows, and pending states.

Spinner styles and sizes

Set variant="tail" to fade the rotating highlight into the ring. The default arc variant uses a solid highlight. Both variants support sm, md, and lg sizes and respect reduced-motion preferences.

Default arc
  • Small
  • Medium
  • Large

Loading on a dark surface

foreground sets the highlight and background sets the ring track. Leave background unset to use a faint tint of the highlight. Use label to describe what is loading when the spinner provides the status on its own.

Starting your preview

Your preview will open when it’s ready.

Playground

Spinner playground

Saving
Playground.vuevue
Install
npm install @getdom/studio
vue
<script setup>
import '@getdom/studio/style.css';
import { reactive } from 'vue';
import { DomSpinner } from '@getdom/studio';

const data = reactive({
		"label": "Saving",
		"size": "md",
		"variant": "tail",
		"tone": "primary",
		"background": "",
		"foreground": ""
	});
</script>

<template>
	<DomSpinner
		v-bind="data"
	/>
</template>

Reference

Props

Control props

NameTypeTSDefaultDescription
labelstringstring'Loading'Screen reader label.
size'sm' | 'md' | 'lg'string'md'Spinner size.
variant'arc' | 'tail'string'arc'Use a solid arc or a highlight with a fading tail.
tone'primary' | 'neutral' | 'success' | 'warning' | 'danger'string'primary'Spinner foreground colour when no custom foreground is provided.
backgroundstringstring''CSS color for the stationary donut track. Defaults to a tint of the foreground.
foregroundstringstring''CSS color for the spinning arc. Overrides tone when provided.

Auto-generated from Spinner.props and inline _edit hints.