Skeleton

PreviousNext

Animated placeholder shown while content is loading.

Basic Usage

Avatar

Card

Mimicking your UI

Skeletons are always hand-crafted — there is no auto-generation. The principle is to replicate your real layout using the same wrapper structure (grid, flex, gap, padding), then replace each visible element with a <Skeleton> of matching dimensions.

Practical steps:

  1. Build the skeleton alongside the real component in the same file
  2. Wrap both in a conditional: show skeleton while data is loading, render real content once it arrives
  3. Match widths, heights, and border-radius class-by-class — use the same Tailwind size utilities you use in the real UI

For rounded shapes use rounded-full; for square/rectangular areas the default rounded-xl applies, or override with any rounded-* class via className.

Props

PropTypeDefaultDescription
classNamestringTailwind classes to control size, shape, and rounding

The component also accepts all standard HTML div attributes.