Skeleton
A placeholder while content loads: a fine pixel texture with a soft light gliding across it. CSS only; the glide is a GPU transform that starts mid-sweep, so it never looks frozen. Hidden from screen readers; announce loading elsewhere (for example aria-busy on the region).
import { Skeleton } from "pixelbits/skeleton";
export default function Demo() {
return (
<div
role="status"
aria-busy="true"
aria-label="Loading profile"
className="flex w-full max-w-sm gap-3"
>
<Skeleton shape="square" className="size-12" />
<div className="grid flex-1 content-start gap-2">
<Skeleton shape="text" className="w-2/3" />
<Skeleton shape="text" />
<Skeleton shape="text" className="w-1/2" />
</div>
</div>
);
}Installation
import { Skeleton } from "pixelbits/skeleton";npx shadcn add https://pixelbits.ali-moradi-develop.com/r/skeleton.jsonAPI
<Skeleton>
A placeholder while content loads: a fine pixel texture with a soft light gliding across it. CSS only; the glide is a GPU transform that starts mid-sweep, so it never looks frozen. Hidden from screen readers; announce loading elsewhere (for example aria-busy on the region).
<div aria-busy="true" className="flex gap-3">
<Skeleton shape="square" />
<div className="grid flex-1 gap-2"><Skeleton shape="text" className="w-2/3" /><Skeleton shape="text" /></div>
</div>| Prop | Type | Default | Description |
|---|---|---|---|
| shape | "text" | "block" | "square" | "block" | Shape preset. |
Also accepts every prop of HTMLAttributes<HTMLDivElement>.