Skip to content

Spinner

A rotating Keyline loader glyph.

Size it with a size-* class; it takes the text colour. It keeps turning when the person prefers reduced motion, because it reports progress.

Default

Sizes

Beside a label

Importing 214 rows

With its own name

Installation

npx shadcn@latest add @khaeli/spinner

Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.

Installs with

Registry items
npm packages
  • @keyline-icons/react ^2.2.0

Accessible name

  • By itself the spinner is a status named Loading (role="status", aria-label="Loading"). Pass your own aria-label to say what is loading.
  • Beside text that already says what is happening, hide the spinner with aria-hidden and let the text speak. Put the text in a role="status" element when it appears while the page is in use.
  • In a pending button, hide the spinner with aria-hidden and keep a button text that names the state, such as Saving.

Registry JSON

The item as the shadcn CLI reads it, with every file it ships: https://ui.khaeli.com/r/spinner.json