Skip to content

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

NameTypeDefaultDescription
variant"text" | "rect" | "circle""text"Placeholder shape: a line of text (text), a rectangle (rect) or a circle (circle, e.g. for an avatar).
widthstring | numberundefinedWidth: a number is treated as pixels, a string as a CSS value ('100%', '12rem').
heightstring | numberundefinedHeight: a number is treated as pixels, a string as a CSS value. text/circle have a sensible default.
animatedbooleantrueEnables the shimmer animation. Turn it off for a static skeleton or for prefers-reduced-motion.