size
{ width: string; height: string; minHeight?: string; }
A component that uses the isLoading
prop to display a Skeleton
placeholder until children are ready to be displayed. When used without size
props, it fills the outer dimensions of its children, else it can be sized explicitly to suit different use cases.
If no size
props are provided, the inline and block sizes of Skeleton
will be inferred from the dimensions of its children.
Lorem ipsum dolor sit amet consectetur adipisicing elit.
1. Multiple elements inside one Skeleton.
2. Multiple elements inside one Skeleton.
3. Multiple elements inside one Skeleton.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea. Facilis odio dolorum cupiditate. Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea. Facilis odio dolorum cupiditate. Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea. Facilis odio dolorum cupiditate. Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea. Facilis odio dolorum cupiditate. Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea.
<Stack gap="16px"><Skeleton><Text>Lorem ipsum dolor sit amet consectetur adipisicing elit.</Text></Skeleton><Skeleton><Text>1. Multiple elements inside one Skeleton.</Text><Text>2. Multiple elements inside one Skeleton.</Text><Text>3. Multiple elements inside one Skeleton.</Text></Skeleton><Skeleton><Text>Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea. Facilis odio dolorum cupiditate. Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea.</Text></Skeleton><Skeleton><Text>Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea. Facilis odio dolorum cupiditate. Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea. Facilis odio dolorum cupiditate. Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea. Facilis odio dolorum cupiditate. Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus explicabo modi a mollitia expedita cumque accusantium error beatae velit porro, et laborum, quia quibusdam consequuntur ea.</Text></Skeleton></Stack>
The size
props can be used to size Skeleton
as desired, which also restricts the dimensions of its children.
I am some text inside a 100 x 100 Skeleton
<Skeletonsize={{height: '100px',width: '100px'}}><Text>I am some text inside a 100 x 100 Skeleton</Text></Skeleton>
Skeleton
components can be assembled individually to create bespoke templates, allowing to keep you actual content and your Skeleton
separate if required.`
<Grid gap="16px"><Column span={2}><SkeletonisLoadingsize={{height: '100%',minHeight: '100%',width: '100%'}}><Box /></Skeleton></Column><Column span={10}><Stack gap="16px"><SkeletonisLoadingsize={{height: '36px',minHeight: '36px',width: '50%'}}><Box /></Skeleton><SkeletonisLoadingsize={{height: '18px',minHeight: '18px',width: '85%'}}><Box /></Skeleton><SkeletonisLoadingsize={{height: '18px',minHeight: '18px',width: '50%'}}><Box /></Skeleton><SkeletonisLoadingsize={{height: '18px',minHeight: '18px',width: '75%'}}><Box /></Skeleton><SkeletonisLoadingsize={{height: '18px',minHeight: '18px',width: '33%'}}><Box /></Skeleton></Stack></Column></Grid>
size
{ width: string; height: string; minHeight?: string; }
isLoading
boolean
className
string
atoms
Applies permitted design system styles. See styling documentation for more.