klyv-ui

Spinner

Component

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>
  );
}

More by klyv-ui

View all
  • Gantt Chart

    Gantt Chart

    105
  • Shader Canvas

    Shader Canvas

    69
  • Klyv Animated Beam

    Klyv Animated Beam

    65
  • Pareto Chart

    Pareto Chart

    60
  • Fluid Canvas

    Fluid Canvas

    44
  • Sunburst Chart

    Sunburst Chart

    35
  • Morphing Text

    Morphing Text

    32
  • Time Slot Picker

    Time Slot Picker

    31