Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Components
  2. Skeleton
  3. API and Development

Skeleton

API and Development

View Source
Submit Issue

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.

Props

NameDefaultDescription
childrenCustom content to display as skeleton placeholder. When provided, the skeleton matches the dimensions of the content.
presetPreset style for common content types. Options: TextLine, Paragraph.
widthCustom width for the skeleton (e.g., "200px", "50%", "20rem").
heightCustom height for the skeleton (e.g., "100px", "2rem").
loadingWhether the skeleton is in loading state. Presets automatically set this to true.
labelAccessible label for the skeleton. Defaults to a localized "Loading content" message.

Basic Skeleton

Use for simple loading placeholders with custom content.

Text Line Preset

Use for single-line text placeholders.

The text line preset displays a skeleton with a fixed height suitable for a single line of text.

Paragraph Preset

Use for multi-line paragraph placeholders.

The paragraph preset displays a skeleton sized appropriately for paragraph content.

Custom Dimensions

Specify custom width and height for precise layout control.

Loading State Page

Build complete loading states using multiple skeletons.

Card Skeleton

Create skeleton placeholders for card components.

List Item Skeleton

Use skeletons for loading list items.

Form Field Skeleton

Create skeletons for form fields while data loads.

Mixed Presets

Combine presets and custom skeletons for complex layouts.

Custom Label

Provide custom accessible labels for better context.

Previous

Skeleton / Usage

Next

Skeleton / Accessibility

On this page

Props
Basic Skeleton
Text Line Preset
Paragraph Preset
Custom Dimensions
Loading State Page
Card Skeleton
List Item Skeleton
Form Field Skeleton
Mixed Presets
Custom Label