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 SpinnerButtonLoadingDemo() {
return (
<div className="flex min-h-[200px] w-full items-center justify-center gap-4">
<button
type="button"
aria-busy="true"
disabled
className="inline-flex h-9 items-center justify-center gap-2 rounded-full bg-primary px-4 text-sm font-semibold text-primary-foreground transition-colors disabled:pointer-events-none disabled:opacity-70"
>
<Spinner />
Sending
</button>
<div className="flex items-center gap-2 rounded-full border border-border bg-muted px-3 py-2">
<Spinner
label="Loading transactions"
className="text-muted-foreground"
/>
<span className="text-xs font-medium text-muted-foreground">
Loading transactions…
</span>
</div>
</div>
);
}















