Skeleton

Display a placeholder preview of your content before the data gets loaded to reduce load-time frustration.

<Skeleton variant="text" />

Props

PropTypeDefaultDescription
animation'pulse' | 'wave' | false'pulse'The animation. If false the animation effect is disabled.
childrennodeOptional children to infer width and height from.
classesobjectOverride or extend the styles applied to the component. See CSS API below for more details.
componentelementType'span'The component used for the root node. Either a string to use a HTML element or a component.
heightnumber | stringHeight of the skeleton. Useful when you don't want to adapt the skeleton to a text element but for instance a card.
variant'text' | 'rect' | 'circular''text'The type of content that will be rendered.
widthnumber | stringWidth of the skeleton. Useful when the skeleton is inside an inline element with no width of its own.

Examples

Variants

<Skeleton variant="text" />
<Skeleton variant="circular" width={40} height={40} />
<Skeleton variant="rect" width={210} height={118} />

Animations

<Skeleton />
<Skeleton animation={false} />
<Skeleton animation="wave" />
<Skeleton animation="pulse" />

Inferring Dimensions

<Typography variant="h1"><Skeleton /></Typography>
<Typography variant="h3"><Skeleton /></Typography>