Skip to content

Search

Start typing to search.


Show all pages

Documentation

feedback

Spinner

A small turning ring that shows something is busy, always next to words that say what.

CSS onlyPlain classes; no JavaScript in any stack.

Usage

Put the spinner next to text in a role="status" element, and hide the ring itself with aria-hidden="true".

Saving the lesson…

HTML

Examples

In a button

Keep the button in place with aria-disabled="true" while it works, and change its label.

HTML

Sizes

Match the size to the text next to it.

HTML

Guidance and accessibility

When to use

  • Use a spinner for a short wait in one place, such as a button that saves.
  • For content that takes longer to load, use skeletons; for a task with a known end, use a progress bar.

Accessibility

  • The ring is decoration: hide it with aria-hidden="true" and say what is busy in words, inside a role="status" element so screen readers hear it.
  • It only turns when people allow motion; with reduced motion the ring stands still and the words carry the message.
  • Keep a busy button focusable with aria-disabled="true" instead of disabled, so focus does not jump away.

Classes

Generated from the component contract. Parts use __, modifiers use --.

Classes of the spinner component
ClassKindUse it for
ca-spinnerComponentThe ring. Add one size.
ca-spinner--smSizeFor buttons and small text.
ca-spinner--mdSizeFor body text.
ca-spinner--lgSizeFor a larger area that is loading.

Skins

The same markup, dressed by each skin. Structure and behavior stay the same; only the look changes.

Base skin

Neutral grayscale starting point; product skins extend it and change what differs.

Saving the lesson…

Calaca skin

The Calaca UI brand: hueso paper and tinta ink, cempasúchil marigold, rosa and jade.

Saving the lesson…

Proof skin

Pilot skin pushed far from base: square, heavy, offset shadows, larger targets.

Saving the lesson…

Crossview skin

The CrossView proofing table: cool ground, bond-paper sheets, rule-grey hairlines, one red mark.

Saving the lesson…

Framework notes

Link the prebuilt stylesheet of your skin next to your brand theme. No build step.

HTML
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" href="ca-base.css" />