Skip to content
Theme
endue.ai

Components, Feedback

Skeleton

A block that draws the place of content while it loads, in the shape of what is coming.

Name in code Skeleton

A block that draws the place of content while it loads. It appears after 300ms, so loading that ends sooner never shows it.

When to use

Use Skeleton when you know the shape of the content. When you don’t, use Spinner. An agent’s work is Star.

Appearance

  • The surface is muted. An accent highlight passes across it every 1.6 seconds.
  • It appears after 300ms. Loading that ends sooner than that never shows it.
  • Corner radius is sm (4), md (8, the default), lg (12) or pill.
  • With reduced motion, the highlight is off.

What you provide

  • A width and height that match the real content. If you leave out the width, the block fills its parent.
  • role="status" or aria-busy on the wrapper. The block itself is always aria-hidden.

Markup

<span aria-hidden="true" class="Skeleton_skeleton Skeleton_sm" style="width: 40%; height: 14px"></span>

Don’t

  • Don’t draw a shape that differs from the real layout.
  • Don’t use it together with a spinner. If you know the shape, use a skeleton. If you don’t, use a spinner.