A placeholder shown while content is loading.
$ pnpm dlx shadcn@latest add https://dashral.com/r/skeleton.jsonInstallation
$ pnpm dlx shadcn@latest add https://dashral.com/r/skeleton.jsonAdds the component, the components it builds on, its npm packages and the theme tokens it uses. Using Dashral often? Add the registry to components.json once:
components.json
{
"registries": {
"@dashral": "https://dashral.com/r/{name}.json"
}
}Then add components by name:
$ pnpm dlx shadcn@latest add @dashral/skeletonUsage
example.tsx
import { Skeleton } from "@/components/dashral/skeleton"
<div aria-busy="true" className="space-y-2">
<Skeleton className="h-4 w-48" />
<Skeleton className="h-4 w-32" />
</div>Examples
Loading a widget
The skeleton has the content's shape, so the rows fade in where the placeholders were and nothing jumps.
API reference
Skeleton
Also takes every prop of <div>(opens in a new tab).
| Prop | Type | Default |
|---|---|---|
className | stringExtra classes, merged with cn() so yours win. | — |
Accessibility
- Hidden shapes, not content: mark the loading region aria-busy="true" and announce when it's ready.
Motion
- Pulses softly while loading.