Skeleton Text is a graphical imitation of blocks of text, used as a placeholder while the real text is loading.
Usage
The preview has been updated.
Skeleton Text consists of at least one SkeletonTextLine
. Each line will go all the way across the bounding box, except if there is more than one line; in that case, the last line will be shorter, to more convincingly look like a paragraph of text.
Setting a line's width
prop to narrow
will make that specific line only 33% of the width of the bounding box. This is useful for skeleton text that is meant to mimic short lines of text such as pricing info.
Skeleton Text can also contain a SkeletonTextHeading
, which will take the same height as the text of the specified font size. A SkeletonTextHeading
will only fill 50% of the available width, to more convincingly look like a short heading.
width
Use width="narrow"
to reduce the width of the SkeletonTextLine
The preview has been updated.
Here's an example showcasing how we can show the placeholder while the actual content is loading. Notice how we are also using a zone with the loadingShimmer
background to create a "skeleton image".
The preview has been updated.