Spinner

Loading spinner in sm, default and lg sizes with role status and an accessible Loading label. Drop it into buttons, cards or full page states in a Tailwind app.

src/registry/ui/spinner.tsx/r/spinner.json

Sizes

Installation#

bash
npx shadcn@latest add @minidev/spinner

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/spinner.json

Usage#

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

export function Example() {
  return (
    <Spinner />
  )
}

API reference#

Spinner props
PropTypeDefault
classNamestring-
size"sm" | "default" | "lg""default"
labelstring"Loading"

Examples#

All alerts, toasts and empty states

Learn more