On this page

Skeleton

When to use a skeleton, how to shape it and the tokens it uses.

Draft. Ported from the control-center Skeleton and styled with Beehexa tokens. Not yet approved. It is in the registry so teams can try it; the API may still change before approval.

A skeleton is a grey shape in the place and size of content that is still loading. The page keeps its layout, and the content replaces it at once.

When to use

  • For a page, a panel or a list loading for the first time, when you know its layout.
  • For content that loads in parts, so each part can appear when it is ready.

When not to use

  • For a task people started, such as Save or Sync. Use the button’s loading state or a spinner.
  • For a task with a known size. Use progress.
  • When the layout is unknown. A wrong shape is worse than a spinner.

Shape

  • Match the real content: a circle for an avatar, a line for each line of text at its height, a block for an image.
  • Keep the real headings, labels and column titles; replace only the data.
  • Don’t make every line full width. Vary the widths, as real text does.

Behaviour

  • The shapes pulse slowly. Under reduced motion they stay still.
  • Content replaces the skeleton at once, in the same place, without shifting the layout.

Tokens

Part Token
Fill color.skeleton
Shape radius.control (set radius.full for an avatar)