Skip to content

Spinner ​

Indeterminate loading, for a short wait with no known duration.

Open in demo
Open in demo

Usage ​

Use it for a wait you cannot put a number on. Where you can, Progress is the determinate case, and the skeletons are the content-shaped one: they keep the page from jumping when the data arrives.

The ring is a full border in the current color at low alpha with one side opaque. Rotating that reads as a traveling arc. It inherits currentColor, so it takes the color of whatever it sits in.

Examples ​

Sizes ​

size is xs, sm, md, lg or xl.

A visible label ​

showLabel prints the label beside the ring instead of only announcing it.

Inside a button ​

Skeletons ​

Where you know the shape of what is loading, a skeleton beats a spinner: it holds the space, so the page does not jump when the data lands. Five ship, under src/shared/components/feedback/skeletons/. They follow the active typography scale and density, and features.skeletonLoaders turns them off inside DataTable.

ComponentPropsDefaultWhat it draws
SkeletonTextlines3That many text lines, the last one shorter.
SkeletonCard——A card: title, avatar and three lines.
SkeletonStats——A stat card: title, value and a sparkline strip.
SkeletonFormfields4A label bar and an input bar per field.
SkeletonTablerows, columns5, 5A grid of plain elements, not table rows, so it can stand anywhere a table would.

API ​

Source: src/shared/components/common/SaSpinner.vue

Props ​

PropTypeDefaultDescription
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'12, 16, 24, 32 or 48 pixels, with the border weight to match.
labelstring—What is loading. Defaults to "Loading".
showLabelboolean—Prints the label beside the ring.

Emits ​

None.

Slots ​

None.

Accessibility ​

  • The root is role="status", so the label is announced politely when the spinner appears.
  • The ring is aria-hidden; the label carries the meaning.
  • The label is visually hidden unless showLabel, so it is always there for a screen reader even when the design has no room for it.
  • Pass label="" where something else already announces the wait, so the two do not speak over each other.
  • The rotation stops under prefers-reduced-motion.