docs / core / skeleton
Skeleton
a grey block in the shape of a piece of content, shown while that content loads. hand these into the layout you are waiting on; to grey a whole component at once, reach for SkeletonMirror. wrap a composed placeholder in SkeletonGroup so one sheen crosses every block.
intensity · recedesrsc · server
provenance
authored in usvalayer
core / primitivesintensity
recedes · safe anywhere, including dense surfacescomposition
hand-built blocks that mimic the loading card, list row or avatartext, circle and rect cover a line, an avatar and a media blockSkeletonGroup gives a composed placeholder one continuous border sheennot a spinner. a skeleton promises the shape of what is cominggreying a whole component you already have is SkeletonMirrora11y
decorative,aria-hidden · own the loading announcement on the region around it · the sheen stops under reduced motionjest-axedependencies
class-variance-authorityblocks
props
| prop | type | default | notes |
|---|---|---|---|
| variant | "text" | "circle" | "rect" | "text" | the placeholder shape. text is a line, circle an avatar, rect a media block. |
| width / height | string | number | — | explicit dimensions, applied via inline style. |
| radius | string | number | — | border radius override, applied via inline style. |
get it
bun add @usva-ui/reactusage
import { Skeleton, SkeletonGroup } from "@usva-ui/react/primitives/skeleton";
<SkeletonGroup className="flex flex-col gap-3">
<Skeleton variant="circle" width={40} height={40} />
<Skeleton variant="text" width="60%" />
<Skeleton variant="rect" height={120} />
</SkeletonGroup>