Component reference
Skeleton
An article placeholder while real content loads.
Preview
Live previewOptional six-digit hex. Clear to restore the preset. Check contrast with your brand color.
Changes apply to this preview only.
Article
A card waiting for its content.
Profile
The skeletons stay hidden from assistive technology; one status announces the loading.
Loading profile…
List
Repeating rows while a collection loads.
Width adapts to the available space
"use client";
import {
Card,
CardHeader,
CardTitle,
CardDescription,
CardContent,
Skeleton
} from "@pimolu/react";
export function DemoExample() {
return (
<div
className="grid grid-cols-[repeat(auto-fit,minmax(min(100%,280px),1fr))] gap-6 min-w-0 items-start"
>
<Card>
<CardHeader>
<CardTitle>Article</CardTitle>
<CardDescription>A card waiting for its content.</CardDescription>
</CardHeader>
<CardContent>
<div className="grid gap-5 min-w-0">
<Skeleton shape="rounded" width="100%" height={140} animation="wave" />
<Skeleton width="60%" height={20} animation="wave" />
<Skeleton width="100%" animation="wave" />
<Skeleton width="88%" animation="wave" />
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Profile</CardTitle>
<CardDescription>
The skeletons stay hidden from assistive technology; one status
announces the loading.
</CardDescription>
</CardHeader>
<CardContent>
<div className="grid gap-5 min-w-0">
<p role="status">Loading profile…</p>
<div className="flex flex-wrap items-center gap-3 min-w-0">
<Skeleton shape="circular" width={48} height={48} />
<div className="grid gap-3 min-w-0 flex-1 min-w-0">
<Skeleton width="60%" height={16} />
<Skeleton width="40%" height={14} />
</div>
</div>
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>List</CardTitle>
<CardDescription>Repeating rows while a collection loads.</CardDescription>
</CardHeader>
<CardContent>
<div className="grid gap-5 min-w-0">
{
[0, 1, 2].map((row) => (<div
key={row}
className="flex flex-wrap items-center gap-3 min-w-0"
>
<Skeleton shape="circular" width={36} height={36} />
<div className="grid gap-3 min-w-0 flex-1 min-w-0">
<Skeleton width="45%" height={14} />
<Skeleton width="75%" height={12} />
</div>
</div>))
}
</div>
</CardContent>
</Card>
</div>
);
}More examples
Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.
Shapes
text, rectangular, rounded and circular.
Animations
pulse, wave and none. Both stop automatically under prefers-reduced-motion.
Dimensions
A number means pixels; a string accepts any CSS unit.
Usage
Match the approximate structure and reserve space to reduce layout shift.
API reference
Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.
PimoluSkeletonProps
Type source| Name | Type | Default | Description |
|---|---|---|---|
shape | "text" | "rounded" | "rectangular" | "circular" | undefined | "text" | Shape of the placeholder. |
animation | "none" | "pulse" | "wave" | undefined | "pulse" | Visual animation. |
width | Property.Width<string | number> | undefined | — | CSS width: number = pixels, or CSS unit string. |
height | Property.Height<string | number> | undefined | — | CSS height: number = pixels, or CSS unit string. |
onChange | ChangeEventHandler<HTMLSpanElement, Element> | undefined | — | Standard React/HTML attribute. |
defaultValue | string | number | readonly string[] | undefined | — | Standard React/HTML attribute. |
className | string | undefined | — | Standard React/HTML attribute. |
style | CSSProperties | undefined | — | Standard React/HTML attribute. |
onClick | MouseEventHandler<HTMLSpanElement> | undefined | — | Standard React/HTML attribute. |
shape"text" | "rounded" | "rectangular" | "circular" | undefinedDefault: "text"
Shape of the placeholder.
animation"none" | "pulse" | "wave" | undefinedDefault: "pulse"
Visual animation.
widthProperty.Width<string | number> | undefinedNo default extracted.
CSS width: number = pixels, or CSS unit string.
heightProperty.Height<string | number> | undefinedNo default extracted.
CSS height: number = pixels, or CSS unit string.
onChangeChangeEventHandler<HTMLSpanElement, Element> | undefinedNo default extracted.
Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefinedNo default extracted.
Standard React/HTML attribute.
classNamestring | undefinedNo default extracted.
Standard React/HTML attribute.
styleCSSProperties | undefinedNo default extracted.
Standard React/HTML attribute.
onClickMouseEventHandler<HTMLSpanElement> | undefinedNo default extracted.
Standard React/HTML attribute.
Accessibility
- Keep placeholder shapes decorative and announce loading once on the containing region.