Skeleton
On this page
Style
A skeleton uses basic shapes to provide a low-fidelity representation of loading content. A gradient animation overlays the shapes to indicate activity.
Anatomy
- Heading skeleton
- Body text skeleton group
- Skeleton group
- Shape skeleton
Color scheme
Skeletons are available in both light and dark schemes. The shapes use varying opacities of --rh-color-black
and --rh-color-white
to make them visible against different background colors.
Helpful tip
It is recommended to match color schemes. For example, if you are working in a section with a dark background, use the dark color scheme skeleton.
Light scheme
Dark scheme
Configuration
Types
There are five types of skeletons: body text, heading, circle, square, and rectangle.
Sizes
Body text and heading skeleton sizes are named based on their corresponding font size tokens, and the sizes range from xs
to 2xl
.
Helpful tip
These are the sizes built into the element. However, the sizes can be customized with CSS, as the skeleton is primarily lightDOM-based.
The default and only built-in size for shape skeletons sets its height to the value of --rh-length-4xl
. However, most shape skeletons will need to use a custom size, and any length token or pixel value can be used to change their dimensions.
Space
The space between body text skeletons is --rh-space-xs
. Otherwise, spacing should be based on the structure of the page or section.
Interaction states
A skeleton is intentionally not operable or navigable and has no interaction states.
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.