Skip to content

Spinner

An animated loading indicator. Each spinner is a status region (role="status") named by its label, so assistive technology announces it; the animated graphic itself is hidden.

Loadingdefault
Loadingcircle
Loadingpinwheel
Loadingcircle-filled
Loadingellipsis
Loadingring
Loadingbars
Loadinginfinite

API Reference

Import with import { Spinner } from "@/components/ui/Spinner". The component forwards its ref to the outer span.

PropTypeDefaultDescription
variant
"default""circle""pinwheel""circle-filled""ellipsis""ring""bars""infinite"
"default"

Animation style

color
"neutral""primary""destructive""success""warning""info"
"neutral"

Color token. default and secondary are deprecated aliases of neutral; danger of destructive.

size
"xs""sm""md""lg""xl"
"md"

12px · 16px · 24px · 32px · 48px

label"string""Loading"

Accessible name of the role="status" live region

aria-hidden"boolean""undefined"

Makes the spinner purely decorative (no status role or label), e.g. when the surrounding control already reports busy state

className"string""undefined"

Additional CSS classes for the outer element, merged last