Skeleton

The shape of what is loading.

Default

An avatar and two lines of text, in the size they will be.

A pulsing block in the size of the thing that is coming. Because it takes the room the content will take, nothing jumps when the content lands — which is the whole point of it.

Installation

npx philcn@latest add skeleton

The file is written into your project. It is yours from then on — change it as you like.

Props

None of its own. Everything you pass goes straight to the underlying <div>, className included.

Worth knowing

  • Size it with the same classes as the real thing. A skeleton in the wrong size is worse than none: the page moves anyway.