Components

Skeleton

Gray shapes that hold the place of content while it loads

Overview

Skeleton shows the shape of what is coming while data loads. People see where things will appear, and the page moves less when the data arrives.

  • Shapes — line for a line of text, block for a field, badge or chart, circle for a dot or a donut
  • Hidden from screen readers — every shape is aria-hidden. Wrap them in Skeleton.Region, which marks the area aria-busy and announces one hidden message
  • Slow pulse — fades with the loop motion token. With reduced motion it stays still

Shapes

Loading a card

Loading logs…

Props

PropTypeDefaultRequiredDescription
shape'line' | 'block' | 'circle''line'Noline holds a line of text, block holds a field, badge or chart, circle holds a dot or a donut
widthstring | number-NoWidth. Numbers are pixels. line and block fill the parent when it is not set
heightstring | number-NoHeight. Numbers are pixels

Skeleton.Region

PropTypeDefaultRequiredDescription
childrenReactNode-YesThe shapes, laid out like the content that is coming
labelstring'Loading…'NoHidden message that screen readers announce once

Specification

base

상태요소속성값
enabledrootbackgroundColor$color.background.skeleton.default

shape=line

상태요소속성값
enabledrootborderRadius$size.radius.100
enabledrootheight14px토큰 아님 — Body Small line. Pass height to match other text sizes

shape=block

상태요소속성값
enabledrootborderRadius$size.radius.200
enabledrootheight32px토큰 아님 — same height as Button and Select

shape=circle

상태요소속성값
enabledrootborderRadius$size.radius.full
enabledrootwidth16px토큰 아님 — status dot size. Pass width and height for a donut
enabledrootheight16px토큰 아님 — status dot size. Pass width and height for a donut

Guidelines

  • Only data becomes a skeleton. Page titles, buttons, tabs and section headings stay as real text.
  • Show at most three repeated items, such as cards in a list. Do not imitate the real count.
  • Show skeletons only for the first load. When data is already on screen, keep it while refreshing.
  • Give lines different widths (100%, 75%, 45%) so the shape reads as text.