Spinner

Animated loading spinner indicator. Install Spinner from the VLLNT UI registry with the shadcn CLI.

Report a bug

Animated loading spinner indicator. Part of the utility family in VLLNT UI, it ships as a machine-readable registry entry — copy the source directly into your app with the shadcn CLI and own it, no runtime dependency on a component library.

Preview

Switch between light and dark to inspect the embedded Storybook preview.

Installation

Add Spinner to your project with the shadcn CLI. The source lands in your codebase, ready to adapt:

pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/spinner.json

Source

import { cn } from "../../lib/utils"; export type SpinnerProps = { size?: "lg" | "md" | "sm"; } & React.HTMLAttributes<HTMLDivElement>; function Spinner({ className, size = "md", ...props }: SpinnerProps) { return ( <div className={cn( "animate-spin rounded-full border-2 border-current border-t-transparent", { "size-4": size === "sm", "size-6": size === "md", "size-8": size === "lg", }, className, )} {...props} > <span className="sr-only">Loading&hellip;</span> </div> ); } export { Spinner };

Stories

Explore every variant and state in the interactive Storybook:

Preview

Switch between light and dark to inspect the embedded Storybook preview.

Dependencies

  • @vllnt/ui@^0.3.0