Skip to content

Skeleton

A loading placeholder in the control-outline tone.

Size and shape each skeleton with classes so it stands where the content will be: the content then arrives without moving the page. The pulse stops when the person prefers reduced motion; the shapes stay.

Shapes

In place of content

Loading the project owner

Installation

npx shadcn@latest add @khaeli/skeleton

Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.

Installs with

Registry items

Accessible name

  • A skeleton is an empty div with no role and no name: a screen reader finds nothing there.
  • Say what is loading in text, visually hidden if need be, and set aria-busy on the region while it loads. A group of skeletons that is only decoration takes aria-hidden.

Registry JSON

The item as the shadcn CLI reads it, with every file it ships: https://ui.khaeli.com/r/skeleton.json