Skeleton
FeedbackA placeholder shaped like content that is loading: <Skeleton> is a pulsing block, sized and shaped with classes (h-4 w-40, size-10 rounded-full). It is hidden from assistive technology: mark the region that is loading aria-busy="true", and give it a name or a status text. The pulse stops with reduced motion.
import { Skeleton } from '@limerdev/zest'; Use for
The first load of a page or card whose layout is known: a table's rows, a profile.
Don't
A short wait, or one of unknown shape: show nothing, or a spinner in the button that started it. Progress you can measure: use
Progress.Examples
Basic
Blocks shaped like the content that is loading; the region is marked busy.
<script lang="ts">
import { Skeleton } from '@limerdev/zest';
</script>
<div class="flex items-center gap-3" aria-busy="true" aria-label="Loading customer" role="region">
<Skeleton class="size-10 rounded-full" />
<div class="grid gap-2">
<Skeleton class="h-4 w-40" />
<Skeleton class="h-4 w-28" />
</div>
</div> Card
A card while it loads: the same parts, with skeletons for the text.
<script lang="ts">
import { Card, Skeleton } from '@limerdev/zest';
</script>
<Card.Root class="w-80" role="region" aria-busy="true" aria-label="Loading customer">
<Card.Header>
<Skeleton class="h-5 w-32" />
<Skeleton class="h-4 w-44" />
</Card.Header>
<Card.Content class="grid gap-2">
<Skeleton class="h-4 w-full" />
<Skeleton class="h-4 w-3/4" />
</Card.Content>
</Card.Root> Props
Every part also takes class (merged over its defaults), ref (bindable: the element), children, and child (a snippet that
renders your own element, with props to spread on it).
Skeleton
No props of its own beyond the common ones.