Six coherent loading indicators that take the text color and move with the temperament.
Loading stateLoading state
Invoices
Northwind Studio workspace
Fetching invoices
Pulling the last 30 days from billing
loader, lively
Use a loader when something is working and you can't say how long it will take: a button that is saving, a reply being typed, a search, a sync. The six variants are drawn from one kit (same box, stroke and rhythm), so a page can mix a spinner in a button with dots in a chat bubble and they still read as one family. When you know the layout of what is coming, prefer a Skeleton; when you know the progress, show a progress bar.
| Variant | Reads as | Good for |
|---|---|---|
spinner | a comet running on a track | buttons, inline actions |
dots | three dots hopping in turn | typing indicators, chat |
bars | an equalizer | audio, uploads, streaming |
orbit | satellites thrown in halves | search, AI answers |
pulse | rings leaving a core | live status, syncing, recording |
bounce | a ball with its shadow | empty states, playful onboarding |
The temperament shapes each beat: with calm the dots and the ball barely squash and nothing
overshoots, with lively they squash a fifth of their size on landing and the bars and orbit
overshoot lightly, with playful the squash is clear and the throws overshoot and settle back.
pnpm dlx shadcn@latest add @motionkit-pro/loadernpx shadcn@latest add @motionkit-pro/loaderyarn dlx shadcn@latest add @motionkit-pro/loaderbunx --bun shadcn@latest add @motionkit-pro/loaderRequires a Signature license and the @motionkit-pro registry with your token. See Installation.
import { Loader } from "@/components/ui/loader"
export function SaveButton() {
return (
<button type="button" disabled className="inline-flex items-center gap-2">
<Loader size="sm" label="Saving changes" />
<span aria-hidden>Saving changes</span>
</button>
)
}It takes its color from the text color, so any text-* class (or the parent's color) tints it:
<Loader variant="pulse" className="text-success" />success is a MotionKit token: the install adds it to your theme (--success, light and dark).
Sizes are sm (16px), md (24px, default), lg (32px) and xl (48px); a size-* class sets
any other box and the drawing scales with it. Set the character per loader or for the whole app:
<Loader variant="bounce" temperament="playful" />
<MotionKitProvider temperament="calm">
<App />
</MotionKitProvider>Prop
Type
Also accepts all props of Omit<ComponentProps<"span">, "children">.
A typing indicator, a sync row and a busy button.
Loading stateLoading state
Syncing workspace
3 of 12 files
loader, lively
The kit side by side: same box, stroke and rhythm.
Loading stateLoading state
spinner
Buttons, inline
dots
Typing, chat
bars
Audio, uploads
orbit
Search, AI
pulse
Live, syncing
bounce
Empty states
loader, lively
role="status" live region: screen readers announce label ("Loading" by
default) politely when it appears. Give it a specific label ("Saving changes", "Ada is typing").aria-hidden; only the label is exposed.currentColor. On the default foreground every part meets the 3:1 contrast
for graphics in both themes, even at rest (dots and bars never fade below 60%); tracks and
trails are decorative and lighter on purpose. On a tinted surface such as a chat bubble, use a
strong text color (text-foreground/80 on bg-muted), not text-muted-foreground.aria-hidden) so it is not read twice, as in the usage example.None: a loader is not interactive and never takes focus.
With reduced motion (the OS setting, or MotionKitProvider reducedMotion="always") nothing
travels, spins or squashes: every part stays in place and slowly breathes in tone (never below
60% opacity, so the still drawing stays readable), in sequence
for the dots and bars, so it still says "working". The pulse rings are hidden and the orbit's
satellites rest spread along their path. The OS setting applies even before hydration, from the
component's own stylesheet.
transform and opacity, run by the compositor: no JavaScript per
frame. The keyframes ship as hoisted <style> tags (one shared, one per temperament in use),
deduplicated by React however many loaders are on the page, so server-rendered fallbacks
(loading.tsx, Suspense) move before hydration.animation-play-state), and follows the global
time scale: at 0.25× every cycle is four times longer.Main spring of each temperament. Set it with the temperament prop or MotionKitProvider; the default is lively.
Not measured yet · budget 15.0 kB gzip
Component and MotionKit helpers; excludes react, react-dom.
a loading state
Nothing travels, spins or squashes: every part stays in place and slowly breathes in tone, in sequence, so it still reads as working.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)