Spinner

@sushindustries/ui

One ring, one border, one turn - with a visually hidden label, because a spinner with nothing to announce is just an animation.

4 min read
View as MarkdownEdit on GitHub

Spinner is a single turning ring with a label that is visually hidden but still announced through role="status". Reach for it whenever there is an operation in flight worth telling someone about, not as decoration next to something that already finished.

Viewport width
Phone22remthe floor, the narrowest this promises to work at
tanstacktanstack add https://adamjurek.com/r/tanstack/spinner.jsonshadcnpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/spinner.json

Why it is built this way

The hidden label is why it exists as a status rather than just a CSS animation: a spinner with nothing to announce is only motion, not information. Reduced motion swaps the turn for a slower pulse instead of removing it outright, because a spinner is still communicating "in progress right now", unlike a skeleton, which just goes still.

Install

tanstack add https://adamjurek.com/r/tanstack/spinner.json
shell
pnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/spinner.json
shell
pnpm add @sushindustries/ui @sushindustries/atoms
shell

What you get

Version0.1.0
Categorycontent · Loading
Filesspinner.tsx
DependenciesNone
Tagsloading, no-deps

No runtime dependencies

It brings nothing with it beyond the stylesheet.