tigran tumasov

Spinner

Component 40

About

Indicate an action running in the background. Unlike the loading dots, this should generally be used to indicate loading feedback in response to a user action, like for buttons, pagination, etc. A recreation of Vercel's Geist design system.

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 React from "react";
import { Spinner } from "@/components/ui/spinner";

export const Default = () => {
  return (
    <div className="min-h-[100vh] flex flex-col gap-10 items-center justify-center pb-4">
      <div className="flex flex-col gap-5 w-[60%]">
        <Spinner />
      </div>
    </div>
  );
};

export const CustomSize = () => {
  return (
    <div className="min-h-[100vh] flex flex-col gap-10 items-center justify-center pb-4">
      <div className="flex flex-col gap-5 w-[60%]">
        <Spinner size={30} />
      </div>
    </div>
  );
};

export const CustomColor = () => {
  return (
    <div className="min-h-[100vh] flex flex-col gap-10 items-center justify-center pb-4">
      <div className="flex flex-col gap-5 w-[60%]">
        <Spinner color="red" />
      </div>
    </div>
  );
};

More by tigran tumasov

View all
  • Product Hunt Badge

    Product Hunt Badge

    1.8K
  • Book

    Book

    162
  • Calendar

    Calendar

    152
  • Theme Switcher

    Theme Switcher

    135
  • Snippet

    Snippet

    124
  • Table

    Table

    123
  • Toggle

    Toggle

    89
  • Feedback

    Feedback

    88