Skip to content
New

Spinner

Shows that something is loading. Takes the colour of the text it sits in, or a tone.

Syncing

Installation

Terminal
npx rasengan-ui add spinner

Or with the shadcn CLI, from the registry:

Terminal
npx shadcn@latest add https://ui.rasengan.dev/r/base/spinner.json

Usage

app/usage.tsx
import { Button } from "@/components/ui/button";
import { Spinner } from "@/components/ui/spinner";
 
export function Usage() {
  return (
    <Button disabled>
      <Spinner /> Saving
    </Button>
  );
}

Sizes and tones

Three sizes; without a tone it takes currentColor, so it matches the button, badge or text around it.

<Spinner size="lg" tone="success" />

Villages

The spinner has no surface of its own: it follows the text colour, and the tones follow the nature and the status colours of each village.

Konoha · light
Syncing
Konoha · dark
Syncing
Kiri · light
Syncing
Kiri · dark
Syncing
Iwa · light
Syncing
Iwa · dark
Syncing

Accessibility

  • role="status" with the name "Loading". Say what loads with aria-label ("Loading invoices") when several things can load at once.
  • With reduced motion it turns slowly rather than stopping, so it still reads as busy.

API reference

The props of <svg> (Lucide's Loader2Icon), plus:

PropTypeDefault
size"sm" | "default" | "lg""default"
tone"neutral" | "primary" | "success" | "warning" | "info" | "destructive"none: currentColor

spinnerVariants({ size, tone }) returns the same classes.