Skip to main content
K
Last modified: 24/Jun/2024

Skeleton

Loading indicators express an unspecified wait time or display the skeleton before the content appears.

#Usage

import { useState } from 'react' import { Skeleton } from '@kinsta/stratus' const MyComponent = () => { const [loading, setLoading] = useState(false) return loading ? <Skeleton /> : <div>My Content</div> }

#Props

#type
SkeletonType
Sets the type of the skeleton
text
#size
SkeletonSize
Sets the size of the skeleton
m
#width
string | number
Sets a custom width to the skeleton
#height
string | number
Sets a custom height to the skeleton
#rows
number
Sets the number of rows
1
#rowSizes
(string | number)[]
Sets the size of each row
[]
#containerStyle
SerializedStyles
Sets a custom container style
#delay
number
Sets the delay of the skeleton
0

#See also