Loader

Feedback

A full loading state with a spinner or skeleton pattern.

The Loader composes an optional label with a spinner, or a ready-made skeleton card. Drop it in place of content that is still loading.

npx shadcn@latest add loader

Spinner loader

A centered spinner with an optional label.

Preview
Live

Loading workspace...

tsx
1<Loader label="Loading workspace..." />

Skeleton loader

A skeleton card that mirrors the shape of the content loading behind it.

Preview
Live

Loading workspace...

tsx
1<Loader variant="skeleton" />

API reference

All props of the underlying Base UI primitive are forwarded. The table below documents the Shelf-specific props.

PropTypeDescription
variant"spinner" | "skeleton"= "spinner"The loading pattern to render.
labelstringSupporting text shown under the spinner variant.
classNamestringCustom classes for the loader root.