ui-kit0.0

Feedback

Skeleton

Reserve space while content loads.

Shapes

Three shapes: a text line (16px), a circle for avatars and a block for images. A faint highlight sweeps across; in dark mode it is a lighter band, not a darker one.

Loading

When to use

  • Content takes longer than about a second to arrive and you know its shape: a profile, a card, table rows.
  • To reserve space, so the page does not jump when the real content replaces it.

Not for: waits under a second (show nothing), unknown shapes (use a spinner) or measurable work (use progress).

Profile and card

Match the real layout: the same avatar size, the same number of lines. Toggle to see that nothing moves.

Loading profile

Table rows

Vary the line widths a little so the rows do not look like a barcode.

Loading customers
CustomerPlanAmount

API

Skeleton

PropTypeDefaultDescription
shape'line' | 'circle' | 'block''line'Text line, avatar circle or image block.
widthnumber | string—Number = px, string = any CSS length. A circle is 40px by default and as tall as it is wide.
heightnumber | string—Lines are 16px and blocks 96px by default.
...propsHTMLAttributes<HTMLDivElement>—Forwarded, including ref, className and style.

Size anything with className too: <Skeleton className="h-4 w-40" />.

Accessibility

  • Skeletons are aria-hidden: they have no content to announce.
  • Mark the loading region aria-busy="true" and include a visually hidden role="status" message (“Loading profile”), so the wait is announced once.
  • Remove aria-busy and the status when the content arrives.

Motion

  • A 1.6s linear shimmer (--animate-shimmer) that only moves a gradient behind the shape.
  • Reduced motion: no shimmer; the placeholder is a still, faint fill.