Skeleton
Props
| Name | Type | Default | Description |
|---|---|---|---|
width | number | string | '100%' | Placeholder width. Numbers are interpreted as pixels. Strings are preserved as CSS dimensions. |
height | number | string | '100%' | Placeholder height. Numbers are interpreted as pixels. Strings are preserved as CSS dimensions. |
radius | 'none' | 0 | 1 | 2 | 3 | 4 | 'rounded' | 3 | Design-token radius step. Use none for square corners and rounded for a fully rounded shape. |
index | number | 0 | Stagger index. Each increment delays the animation by 100ms. |
Accessibility
Skeletonsetsaria-hidden="true"by default.- Assistive technology does not read the default placeholders.
- Give the surrounding loading region an accessible name.
- Set
aria-busy="true"on that region. - If the system requests reduced motion, the pulse animation stops.
- In forced-colors mode, placeholders remain visible.
Native attributes
The root element is <div>.
The root element receives:
- HTML attributes.
aria-*attributes.data-*attributes.class.style.- Native event listeners.
An explicit aria-hidden value overrides the default.