StartFoundationsComponentsContent

Skeleton

A skeleton is a gray shape that stands in for content while it loads. You build loading layouts from it.

Stable Figma
OverviewUsageAPIAccessibility
<div style="display: flex; gap: var(--space-12); align-items: center">
  <tk-skeleton shape="circle" style="flex: none"></tk-skeleton>
  <div style="flex: 1"><tk-skeleton lines="2"></tk-skeleton></div>
</div>

Anatomy

Part What it is
tk-skeleton one shape; hidden from screen readers, not focusable
bar, circle, or rectangle the gray fill
lines with lines above 1, stacked bars; the last is 60% wide

Shapes

<tk-skeleton></tk-skeleton>
<tk-skeleton lines="3"></tk-skeleton>
<tk-skeleton shape="circle"></tk-skeleton>
<tk-skeleton shape="rect" style="height: 140px"></tk-skeleton>
shape Stands in for Size
text (default) a line of text follows the surrounding font, so it matches any text style
circle an avatar or an icon 32px, the default Avatar size; set one side to resize it
rect media, a card, a field full width; set its height with CSS
  • Size skeletons with CSS: an inline style, a class, or the grid or flex layout around them. There are no size attributes.
  • Match the real content: the same grid, gaps, boxes, and line counts. Then nothing jumps when the content arrives.
  • lines stacks text bars at the font's own line spacing and shortens the last one, so the block reads as a paragraph. It works on text only. For different widths per line, use several single bars.

Corners

Text bars get radius-4, rectangles radius-8, circles radius-full. To match content with other corners, set --tk-skeleton-radius.

<tk-skeleton shape="rect" style="height: 140px; --tk-skeleton-radius: var(--radius-12)"></tk-skeleton>
<tk-skeleton shape="rect" style="height: 32px; width: 96px; --tk-skeleton-radius: var(--radius-full)"></tk-skeleton>

Layouts

A card with media and text:

<div aria-busy="true">
  <tk-skeleton shape="rect" style="height: 140px"></tk-skeleton>
  <tk-skeleton lines="3" style="margin-block-start: var(--space-12)"></tk-skeleton>
</div>
  • A list: repeat the row from the top of this page. Keep row dividers and icons real.
  • A table: one text bar per cell under the real headers, with a different width per column so the columns still read as columns.

States

<tk-skeleton lines="2"></tk-skeleton>
<tk-skeleton lines="2" effect="none"></tk-skeleton>
  • pulse (default): the shape fades gently in and out. Shapes added at the same time pulse in step.
  • effect="none": a still fill. Use it when many shapes on one screen would pulse at once.
  • With reduced motion, every skeleton is still.