Server Component · 0 KB client JS

Skeleton

A pulsing placeholder that holds space while content loads.

Import#

import { Skeleton } from "astralis-ui";

Swapping in real content#

Pass loaded with the real content as children: the placeholder and the content occupy the same slot, so nothing jumps when data arrives.

Props#

PropTypeDefaultDescription
variant"text" | "circle" | "rect""text"Placeholder shape (size `circle`/`rect` via className or style).
animatedbooleantruePulse animation, automatically paused under `prefers-reduced-motion`.
loadedbooleanfalseRender children instead of the placeholder.

Accessibility#

The placeholder is aria-hidden: it's decoration, not information. If the loading state itself matters to screen-reader users, set aria-busy on the region or show a Loader.