Loader

Shows that something is loading.

spinner
ring
dots
bars
pulse
ripple
orbit
typing

Installation

pnpm dlx shadcn@latest add @paneui/loader

Usage

Examples

Speed

Colors

In Context

Sizes

Accessibility

Renders role="status" with aria-label from label (default "Loading").

Motion

Loops are CSS keyframes shipped with the component, so they don't stall on a busy page or restart on re-render. With reduced motion every variant swaps movement, rotation and scale for a soft opacity fade and drops the extra pulse and ripple rings; spinner is opacity-only already.

API Reference

Loader

Loading indicator in eight styles. Also accepts every prop of span.

variant= "spinner"
"spinner" | "ring" | "dots" | "bars" | "pulse" | "ripple" | "orbit" | "typing"
Animation style.
size= "md"
"xs" | "sm" | "md" | "default" | "lg"
12, 16, 24 or 32px; default is the same as md.
speed= 1
number
Multiplier on animation speed; 2 is twice as fast.
label= "Loading"
string
Announced to screen readers.
PropTypeDefaultDescription
variant"spinner" | "ring" | "dots" | "bars" | "pulse" | "ripple" | "orbit" | "typing""spinner"Animation style.
size"xs" | "sm" | "md" | "default" | "lg""md"12, 16, 24 or 32px; default is the same as md.
speednumber1Multiplier on animation speed; 2 is twice as fast.
labelstring"Loading"Announced to screen readers.
data-variant
The variant value.
data-size
The size value.
Data attributeDescription
data-variantThe variant value.
data-sizeThe size value.