Skip to content

Skeleton ​

Shimmering placeholder that holds the space of content while it loads.

Overview ​

The catnip-skeleton component renders a neutral block with a shimmer animation. Use it in place of text, media, or cards whose content is still loading, sized to match the content it stands in for so the layout does not shift when the content arrives.

By default it is one text line tall and fills the available width. Set width, height, and radius as CSS lengths to match other shapes, such as an avatar (radius="50%") or an image.

catnip-graphic uses a skeleton automatically while its artwork loads.

Usage ​

html
<catnip-skeleton></catnip-skeleton>
<catnip-skeleton width="60%"></catnip-skeleton>
<catnip-skeleton width="40px" height="40px" radius="50%"></catnip-skeleton>
<catnip-skeleton width="100%" height="160px" radius="var(--catnip-radius-m)"></catnip-skeleton>

Live example ​

Guidelines ​

  • Match the content's shape and size so nothing moves when the real content replaces the skeleton. Use one skeleton per text line, with shorter widths for the last line of a paragraph.
  • Use skeletons for content that loads in place (lists, cards, media). Use a Spinner for actions without a known layout, such as submitting a form.
  • Keep the placeholder simple: approximate the layout, not every detail of it.

Catnip Design System by Signicat