About
A small inline busy indicator that spins to show a control or region is loading, inheriting the surrounding text color so it reads correctly on any background.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Spinner to your project and fits it to your theme.
Code
How Spinner is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Spinner } from "@/components/ui/spinner";
export default function SpinnerColorDemo() {
return (
<div className="flex min-h-[200px] w-full items-center justify-center gap-6">
<div className="flex flex-col items-center gap-2">
<span className="flex size-11 items-center justify-center rounded-full border border-border bg-background text-foreground">
<Spinner />
</span>
<span className="text-xs font-medium text-muted-foreground">
on surface
</span>
</div>
<div className="flex flex-col items-center gap-2">
<span className="flex size-11 items-center justify-center rounded-full bg-primary text-primary-foreground">
<Spinner />
</span>
<span className="text-xs font-medium text-muted-foreground">
on accent
</span>
</div>
<div className="flex flex-col items-center gap-2">
<span className="flex size-11 items-center justify-center rounded-full bg-foreground text-background">
<Spinner />
</span>
<span className="text-xs font-medium text-muted-foreground">
on ink
</span>
</div>
<div className="flex flex-col items-center gap-2">
<Spinner className="text-muted-foreground" />
<span className="text-xs font-medium text-muted-foreground">faint</span>
</div>
</div>
);
}








