Skeleton
A simple div-based pulse placeholder. It only provides a visual loading shape and is hidden from assistive technology with aria-hidden=true.
@neumorphism-ui/skeletonPreview
Installation
Installation: skeleton
npx shadcn@latest add @neumorphism-ui/skeletonThe CLI resolves npm dependencies, base tokens, utilities, and component source in order.
New to this Registry? Set up the namespace before continuing.
Usage
Import
Skeleton import code
import { Skeleton } from "@/components/ui/skeleton"Example
Skeleton usage code
<div className="flex items-center gap-3" aria-busy="true">
<span className="sr-only">Loading profile</span>
<Skeleton className="size-12 rounded-full" />
<div className="grid flex-1 gap-2">
<Skeleton className="h-4 w-1/3" />
<Skeleton className="h-3 w-2/3" />
</div>
</div>API Reference
| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
Skeleton | classNamerequired | string | — | Sets the placeholder width, height, and radius. |
Skeleton | aria-hidden | boolean | true | Hides the decorative placeholder from the accessibility tree. |
Accessibility
- 01
Because Skeleton is aria-hidden, provide a separate sr-only status message or role=status around it.
- 02
Set aria-busy=true on the loading region when appropriate, then remove it when loading completes.
- 03
The global prefers-reduced-motion rule effectively disables the pulse animation.