API and Development
Skeleton displays placeholder content with animated loading effects while actual content is being loaded. Skeletons provide visual feedback that content is loading and help maintain layout stability during data fetching. It provides animated loading placeholders built on Radix UI's Skeleton component, ensuring consistent loading states across the interface. Skeletons support preset styles for common content types and custom dimensions for flexible layouts, with full accessibility support through proper ARIA labels.
| Name | Default | Description |
|---|---|---|
children | Custom content to display as skeleton placeholder. When provided, the skeleton matches the dimensions of the content. | |
preset | Preset style for common content types. Options: TextLine, Paragraph. | |
width | Custom width for the skeleton (e.g., "200px", "50%", "20rem"). | |
height | Custom height for the skeleton (e.g., "100px", "2rem"). | |
loading | Whether the skeleton is in loading state. Presets automatically set this to true. | |
label | Accessible label for the skeleton. Defaults to a localized "Loading content" message. |