Skeleton
Use to show a placeholder while content is loading.
Powered by
Installation
bash
npx shadcn@latest add @redpanda/skeletonbash
pnpm dlx shadcn@latest add @redpanda/skeletonbash
yarn dlx shadcn@latest add @redpanda/skeletonbash
bunx shadcn@latest add @redpanda/skeletonbash
nubx shadcn@latest add @redpanda/skeletonbash
aube dlx shadcn@latest add @redpanda/skeletonWhen to use
Skeletons show content placeholders during loading states. Use this decision tree:
Usage
tsx
import { Skeleton } from '@/components/ui/skeleton';tsx
<Skeleton className="w-[100px] h-[20px] rounded-full" />Anatomy
The Skeleton component provides loading state placeholders:
plaintext
Skeleton├── Base element (div)├── Animated background - shimmer effect├── Customizable dimensions - width/height via className├── Shape control - rounded variants└── Content-aware sizing - matches target contentExamples
Card
Credits
- We take our inspiration from Shadcn UI for the skeleton style.