Skeleton
Use to show a placeholder while content is loading.
Skeleton — placeholder gris pulsé pour du contenu en cours de chargement. Utiliser des shapes qui matchent la géométrie du contenu réel (avatar rond, titre h-4, ligne de texte h-3).
Vs Spinner : Skeleton = placeholder du layout final, Spinner = juste "ça charge quelque part".
Installation
$ bext ui add skeleton
Copy and paste the following into src/components/ui/skeleton.tsx.
Usage
Anatomy
<Skeleton className="h-4 w-full rounded-md" />
API Reference
Skeleton
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Standard : rounded-md bg-muted animate-pulse. Ajouter h-N w-N pour dimensionner. |
Accessibility
Wrapper le container qui contient les skeletons avec aria-busy="true" aria-live="polite" pour signaler aux AT que le contenu se charge.
Edit this example live in the bext playground — it compiles and runs entirely in your browser.
The React idiom — same UI, for comparison.
On This Page