Skeleton
Skeleton renders a low-fidelity, pulsing placeholder that reserves layout space while content loads. Use it to reduce perceived latency for text lines, avatars, thumbnails, and card shells instead of a spinner. Shape and size are controlled entirely through utility classes on the class prop.
Shapes
Shape and size come entirely from class — a text line, a circle for an avatar, a rounded tile for a thumbnail. There is nothing else to configure, which is the point: a skeleton is only ever the shape of what is coming.
<Skeleton class="h-4 w-48" />
<Skeleton class="size-12 rounded-full" />
<Skeleton class="size-24 rounded-lg" />Mirroring the real layout
A skeleton must have the same shape as the loaded page — same rows, same grid spans, same order. One that differs causes a layout jump the moment the data lands, which is worse than having shown nothing.
<div class="w-full max-w-md space-y-4">
<div class="flex items-center gap-3">
<Skeleton class="size-10 rounded-full" />
<div class="flex-1 space-y-2">
<Skeleton class="h-4 w-32" />
<Skeleton class="h-3 w-20" />
</div>
</div>
<div class="bg-card surface-sheen space-y-3 rounded-lg p-4">
<Skeleton class="h-4 w-2/3" />
<Skeleton class="h-4 w-full" />
<Skeleton class="h-4 w-4/5" />
</div>
</div>API
| Prop | Type | Default | Description |
|---|---|---|---|
class | string | Tailwind utility classes that define the placeholder shape and size (e.g. |