Tonic UI
Getting StartedColor ModeColor StyleVersionsContributing
THEME
BordersBreakpointsColorsOutlinesPositionsSpacingSizesShadowsTypography
BUILDING BLOCKS
BoxControlBox
UTILITIES

Skeleton

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

Import

Usage

Variants

This component provides 3 shape variants: text, rect, and circle.

EDITABLE EXAMPLE

Animations

The animation is disabled by default. You can change the animation effect to pulse or wave.

EDITABLE EXAMPLE

Inferring dimensions

In addition to accepting width and height props, the component can also infer the dimensions.

EDITABLE EXAMPLE

Props

NameTypeDefaultDescription
variantstring'text'The type of content that will be rendered. One of: 'text', 'rect', 'circle'
animationstringThe animation effect. One of: 'pulse', 'wave'
widthnumber | stringWidth of the skeleton. Useful when the skeleton is inside an inline element with no width of its own.
heightnumber | stringHeight of the skeleton. Useful when you don't want to adopt the skeleton to a text element.