Import
Usage
Multiple lines
Custom dimensions
Inline skeleton
Custom border radius
Without animation
Custom duration
Custom colors
Loading patterns
Card skeleton
List skeleton
Table skeleton
Profile skeleton
Using Skeleton.Provider
Conditional rendering
API reference
Skeleton
string | number
Width of the skeleton. Can be a number (px) or string (e.g., “100%”, “200px”). Defaults to “100%” for block elements or “50px” for inline elements.
string | number
default:"var(--rs-space-4)"
Height of the skeleton. Can be a number (px) or string (e.g., “100px”, “2rem”).
string | number
default:"var(--rs-radius-2)"
Border radius of the skeleton. Can be a number (px) or string.
boolean
default:"false"
When true, renders the skeleton as an inline element.
number
default:"1"
Number of skeleton lines to render.
boolean
default:"true"
Controls whether the skeleton displays the shimmer animation.
number
default:"1.5"
Duration of the animation in seconds.
string
Base color of the skeleton. Overrides the default theme color.
string
Highlight color used in the shimmer animation. Overrides the default theme color.
string
Additional CSS class names to apply to the skeleton.
CSSProperties
Inline styles to apply to the skeleton.
string
CSS class names to apply to the container element.
CSSProperties
Inline styles to apply to the container element.
Skeleton.Provider
Provides shared configuration for multiple skeleton components.string
Base color applied to all child skeletons.
string
Highlight color applied to all child skeletons.
number
Animation duration applied to all child skeletons.
boolean
Controls animation for all child skeletons.
React.ReactNode
required
The skeleton components to be wrapped by the provider.