ComponentsFeedback
Skeleton
A placeholder shape while content loads.
A placeholder shape while content loads.
The same component at all four levels. Pick the one that fits your project; they share tokens, so they mix.
npm i junco @junco/tailwindimport { Skeleton } from "junco";
<Skeleton isLoaded={!!user} className="h-4 w-32">
<p>{user?.name}</p>
</Skeleton>Match the skeleton to the shape of the real content so nothing jumps when it loads.
Skeleton#isLoadedclassName| Prop | Type | Default |
|---|---|---|
isLoadedRenders children instead of the placeholder. | boolean | false |
classNameSize and shape it, e.g. h-4 w-32 or size-10 rounded-pill. | string | – |