Skeleton API
View componentThe full prop reference for the Skeleton component. A placeholder preview of content before the data loads.
Import
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.
| Prop | Type | Default |
|---|---|---|
| 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 | numberWidth of the skeleton (e.g., '100%', '120px', or number for pixels) | — |
| height# | string | numberHeight of the skeleton (e.g., '1rem', 40) | — |
| lines# | numberNumber of text lines to repeat; when > 1, renders flex column of text skeletons with last line at 4/5 width | — |
| className# | stringAdditional CSS classes merged with variant styles | — |
| style# | React.CSSPropertiesInline styles (width, height applied via style prop) | — |
Skeleton.Group
Container for organizing multiple skeleton elements with consistent spacing
| Prop | Type | Default |
|---|---|---|
| gap# | number | stringGap between skeleton items in flex column layout | '0.5rem' |
| className# | stringAdditional CSS classes | — |
| style# | React.CSSPropertiesInline styles | — |
Source code
If you didn't find what you need here, read the component implementation .