Skip to contentKino
Skip to Content

Spinner

The spinner every Kino component shows while something loads. It looks the same whichever icon library your project uses.

npx shadcn add https://kinoui.com/r/spinner.json
Share on

Examples

Default

It is 16px and takes the text colour around it.

Size and colour

Size it with a size- class and colour it with a text colour.

Syncing 12 files

Beside text

When the text already says what is loading, hide the spinner from screen readers.

Named

On its own, say what is loading with aria-label.

Installation

npx shadcn@latest add https://kinoui.com/r/spinner.json
Files
components/kino/spinner.tsx

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

Props

PropTypeDefaultDescription
classNamestringNoneThe size and the colour.
aria-labelstring'Loading'What is loading, for a screen reader.
...propsComponentProps<'svg'>NoneEvery other prop goes to the <svg>.

Accessibility

  • On its own the spinner is an image named "Loading". Pass aria-label to say what is loading.
  • Beside text that already says it, hide the spinner with aria-hidden.
  • The spinner announces nothing when it appears or leaves. Say the result in a role='status' region that is on the page before the result arrives.
  • When the system asks for less motion, the spinner pulses in place of turning, so loading still shows.