structyl

Skeleton API

View component

The full prop reference for the Skeleton component. A placeholder preview of content before the data loads.

Import

tsx
import { Skeleton } from '@structyl/styled';

Props

Skeleton

A customizable loading placeholder component with animation variants and flexible sizing. Supports both single and multi-line text skeletons.

PropTypeDefault
variant#'pulse' | 'shimmer' | 'static'

Animation style: pulse for solid fade, shimmer for sweep effect, static for reduced-motion

'shimmer'
shape#'rect' | 'circle' | 'text'

Visual shape: rect for rounded rectangle, circle for full circle, text for text line height

'rect'
width#string | number

Width of the skeleton (e.g., '100%', '120px', or number for pixels)

height#string | number

Height of the skeleton (e.g., '1rem', 40)

lines#number

Number of text lines to repeat; when > 1, renders flex column of text skeletons with last line at 4/5 width

className#string

Additional CSS classes merged with variant styles

style#React.CSSProperties

Inline styles (width, height applied via style prop)

Skeleton.Group

Container for organizing multiple skeleton elements with consistent spacing

PropTypeDefault
gap#number | string

Gap between skeleton items in flex column layout

'0.5rem'
className#string

Additional CSS classes

style#React.CSSProperties

Inline styles

Source code

If you didn't find what you need here, read the component implementation .

structyl — Accessible React Component Library