.skeleton with role="status" for loading placeholders. Add .line for text skeletons or .box for image/avatar skeletons.
Basic Usage
Line Skeletons
Use.skeleton.line to create text loading placeholders:
- Full width by default (100%)
- 1rem height
- Stacked with bottom margin
Box Skeletons
Use.skeleton.box for square placeholders (avatars, thumbnails, etc.):
- 4rem × 4rem square by default
- Can be resized with inline styles
Skeleton Card
Combine skeletons to create loading cards:Custom Sizes
Customize skeleton dimensions with inline styles:Multiple Lines
Create paragraph skeletons with multiple lines:Layout Examples
Profile Skeleton
List Skeleton
Grid Skeleton
Animation
Skeletons include a smooth shimmer animation:- Left-to-right gradient sweep
- 2-second duration
- Infinite loop
- Light/dark mode aware colors
Styling
Skeletons use:- Muted background color
- Animated gradient overlay
- Rounded corners (medium radius)
- Auto-stacking with margin
- Color-mix for subtle shimmer effect
Dynamic Loading
Show skeletons while loading data:Accessibility
Therole="status" attribute:
- Announces loading state to screen readers
- Indicates dynamic content area
- Provides semantic meaning
aria-label for clarity:
For spinning loaders, see the Spinner component.