Skeleton

Animated loading placeholder that mirrors the shape of pending content

Category: display · WCAG 2.2-AA · loading, placeholder, shimmer, ai

Variants

Props

PropTypeDefaultDescription
variant'text' | 'circle' | 'rect'textShape of the placeholder: `text` (stacked lines), `circle` (an avatar), `rect` (a block).
widthstring—CSS length applied as an inline custom property
heightstring—CSS length applied as an inline custom property
linesnumber1Number of bars for the text variant; the last bar renders shorter
aibooleanfalseTints the placeholder and its sheen with the AI hue, marking content that an AI is generating (Carbon’s AI skeleton).

Design tokens

When to use

When not to use

How to build an accessible Skeleton in React →

Examples

Text

<Skeleton lines={3} />

Avatar

<Skeleton variant="circle" width="3rem" height="3rem" />

Image

<Skeleton variant="rect" height="12rem" />

AI-generated content

<Skeleton ai lines={3} />

Related components

← Back to docs