di0rio

Spinner

Component

About

A lightweight CSS-animated SVG loading spinner that runs with zero client JavaScript, for showing inline or button loading states.

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 SpinnerDefault() {
  return (
    <div className="flex items-center gap-6 text-muted-foreground">
      <Spinner />
      <Spinner className="size-6" />
      <span className="flex items-center gap-2 text-sm">
        <Spinner className="text-brand-foreground" label="Saving" /> saving…
      </span>
    </div>
  );
}