Appearance
Function: Skeleton()
ts
function Skeleton(props?: UiSkeletonProps): Block;Defined in: packages/sdk/src/renderer/blocks/index.ts:2665
Experimental
Skeleton — animated placeholder shown while content loads.
Renders muted, pulsing blocks in the rough shape of the content that is about to appear, keeping the layout stable while a fetch is in flight. Pick a variant to match the content it stands in for: 'default' (avatar beside text lines), 'card' (media block above text lines), or 'text' (text lines only). lines controls the number of text lines. variant, lines, and hidden each accept an async function of UI state, so the placeholder can swap out once the real content loads.
Parameters
| Parameter | Type |
|---|---|
props? | UiSkeletonProps |
Returns
Examples
ts
Skeleton({variant: 'card'});ts
Skeleton({variant: 'text', lines: 4});ts
Skeleton({hidden: ({data}) => Boolean(data.loaded)});