Components/Feedback/Spinner
COMPONENT53.53

Spinner

Loading indicator on [aria-busy] that inherits the current color — drops into buttons, badges and text. Pure CSS.


INSTALL

1pnpm dlx @sayagodev/mo add spinner

Or import the files from the package (no copy):

1import "@sayagodev/mo/css/spinner.css";

EXAMPLES

Badge
Syncing Updating Processing
Button
Size

USAGE

1<span aria-busy="true"></span>2 3<button aria-busy="true">Saving…</button>

API

NAMEKINDDESCRIPTION
[aria-busy]attributeTurns any element into a busy/loading state; inline spinners inherit currentColor.
--mo-spinner-sizetokenDiameter of the spinner.
--mo-spinner-speedtokenRotation period.

FILES

src/css/spinner.css
Install:mo add spinner

THEMING · PLAYGROUND

This is the exact component from the examples above, wearing a completely different theme. Edit the tokens and --mo-* hooks in the editor — autocomplete knows them all — and the preview obeys in real time. Your CSS always wins.

Tokens & hooks — edit live
Global tokens
--muted--primary--radius

Preview

SyncingUpdating

Your CSS

Try it: type --mo- for the component hooks, or edit any value — the preview obeys in real time.