Loading Indicator
For short waits you can't measure. A soft shape springs from one form to the next as it turns, so waiting feels calm rather than mechanical. Skeletons hold the place of content that's on its way.
Install
npx shadcn@latest add @nelumbo/loading-indicator @nelumbo/skeletonLoading indicator
Seven shapes in a loop: burst, cookie, pentagon, pill, sun, clover and oval. Contained puts it on a filled circle, for use over images or busy content. With reduced motion it stays still and gently pulses.
default
contained
color="brand"
brand, contained
size={24}
size={72}
In context
A contained indicator drops in over the list while it refreshes, as with pull to refresh.
Inbox
- Quarterly review
- Design crit notes
- Your order has shipped
- Team offsite, final plan
Skeleton
Placeholders in the shape of the content, with a soft light sweeping across. Size and round them with className, as in shadcn. Mark the region with aria-busy; skeletons themselves are hidden from screen readers.
Usage
import { LoadingIndicator } from "@/components/ui/loading-indicator"import { Skeleton } from "@/components/ui/skeleton"<LoadingIndicator /> // aria-label="Loading"<LoadingIndicator contained color="brand" size={64} aria-label="Refreshing" /><div aria-busy={loading}> <Skeleton className="size-10 rounded-full" /> <Skeleton className="h-4 w-40" /></div>Props
| Prop | Type | Default | Notes |
|---|---|---|---|
LoadingIndicator contained | boolean | false | On a filled circle |
LoadingIndicator color | "auto" | "neutral" | "brand" | "auto" | |
LoadingIndicator size | number | 48 | Container in px; the shape is 38/48 of it |
LoadingIndicator aria-label | string | "Loading" | What screen readers hear |
Skeleton className | string | Set the size and radius here |