Feedback & overlays / Spinner

Feedback & overlays

Spinner

A ring for work in flight — a save, a refresh — alone, with a caption, or over the content it is recomputing.

import { EcoSpinner } from "vue-ecosphere"

Sizes

One role="status" named by label (visually hidden). It is honest for a second or two; a page or section loading its data for the first time takes a Skeleton instead.

LoadingLoadingLoading the timetable

With a caption

Say what is happening, not just that something is.

Recalculating totalsRecalculating totals…

Over content

Wrap a region that is being refreshed. It stays in place, dimmed and inert, so nothing jumps; keep the control that started the work outside the wrapper. Replaces a-spin :spinning.

INV-2041

Invoice
INV-2041
Billed to
Northwind Academy
Amount
₹ 1,24,500
Due
Aug 30

Reduced motion

With prefers-reduced-motion the ring stops turning and pulses slowly instead. It never freezes: a still ring reads as a hang.

SavingSaving

API

NameTypeDefaultDescription
size"sm" | "md" | "lg""md"16px inline with text, 24px, or 36px for a whole panel.
labelstring"Loading"Accessible name in a visually hidden sr span inside role="status". Say what is loading. "" renders it decoratively (inside a control already marked aria-busy).
captionstring—Visible line under the ring that says what is happening.
spinningbooleantrueShow the ring. When wrapping content, also the mask, aria-busy and inert.
#defaultslot—Content to wrap. It stays rendered; while spinning it is dimmed under a mask, aria-busy and inert, with the ring centred.