Skip to content
Preview

Skeleton

shape
"text" | "block" | "circle"
Default: "text"
text: one line of the surrounding text (1lh tall) with a 6px bar centred in it, so a skeleton label keeps a row's height and a passage keeps the prose pitch. block: a filled rectangle (images, cards). circle: an avatar or icon placeholder.
width
SkeletonLength
Width, e.g. "72%" or "var(--space-16)". Default 100% (circle: 24px; a passage: its container).
height
SkeletonLength
Default: 40px
Height for block.
lines
readonly SkeletonLength[]
A passage on its way, for text: one line of the surrounding text per width, at its line height and no gap, pulsing as one.
rootStyle
RootStyle<SkeletonKnobs>
Typed StyleX override: layout and the --skeleton-* knobs.

Rest props go to <span> props and render.

State machine

PreviewA line holds space for a label.