Loader

Loading indicators in seven styles, including spinner, ring, dots, bars and pulse. When the work finishes, the ring closes into a check before handing off to your content.

Preview

Props Changes apply to the live preview above.

Installation

npx @lumioui/cli add loader

Usage

import { Loader } from "@/components/ui/loader/loader";
<Loader />

Examples

Colors

A cloud-drive upload queue.

Context

A ride request waiting for a driver.

Sizes

Every size where a mail app actually needs it: 16 inline in the send status, 22 trailing a syncing mailbox row, 40 opening a message.

Variants

Six loaders in one device-setup checklist, each matched to the kind of wait it signals.

API reference

Prop Type Default
variant LoaderVariant

Which animation to render. Default "spinner".

"spinner"
size number

Base square size in px. Everything scales from this. Default 32.

32
speed number

Cycle-length multiplier (2 is half as fast). Default 1.

1
active boolean

Run the animation. false pauses the single shared loop (off-screen, idle) and reports not-busy to screen readers. Default true.

true
label string

Accessible label announced to screen readers. Default "Loading".

"Loading"
color
"primary" | "foreground" +2 "primary" | "foreground" | "mutedForeground" | "destructive"

Color token to use. Default "primary".

"primary"
done boolean

The wait is over. The loader resolves in place: the loop stops, the ring closes and ignites, a check draws inside, then it holds.

false
onResolved () => void

Called once the resolved ring has been held (~650ms after it lands).

—
doneLabel string

Accessible label once done. Default "Done".

"Done"
haptics boolean

Fire the success haptic on resolve. Default true.

true
className string —