Menu

Spinner

Loading indicator. 3 sizes × 3 colors.

Installation

$ npx uix-ui@latest add spinner

This copies the file into components/ui/spinner.tsx in your project. npx shadcn@latest add @uix/spinner works too.

Usage

spinner.tsx
import { Spinner } from "@/components/ui/spinner";

<div className="flex items-center gap-5">
  <Spinner size="sm" label="Loading" />
  <Spinner size="md" label="Loading" />
  <Spinner size="lg" label="Loading" />
</div>

Props

PropTypeDefaultDescription
colorbrand | neutral | inverse"brand"
sizesm | md | lg"md"
labelstring"Loading"Accessible name.

Everything else is passed to the root element, so className, aria-* and event handlers work as usual.

Dependencies

Installed for you by the CLI.

  • class-variance-authority
  • clsx
  • tailwind-merge
  • lib/utils.ts
esc

↑↓ to navigate · ↵ to select · esc to close