Appearance
Skeleton
SSkeleton is a loading placeholder: it fills the space of upcoming content with a shimmering gray block, which makes the delay feel shorter. Pure CSS with no dependencies; the element is decorative (aria-hidden), so duplicate the loading status as text nearby for screen readers.
Shapes
Placeholder card
Without animation
API
Props
| Name | Type | Default | Description |
|---|---|---|---|
variant | "text" | "rect" | "circle" | "text" | Placeholder shape: a line of text (text), a rectangle (rect) or a circle (circle,
e.g. for an avatar). |
width | string | number | undefined | Width: a number is treated as pixels, a string as a CSS value ('100%', '12rem'). |
height | string | number | undefined | Height: a number is treated as pixels, a string as a CSS value. text/circle have a
sensible default. |
animated | boolean | true | Enables the shimmer animation. Turn it off for a static skeleton or for
prefers-reduced-motion. |