---
import { Skeleton } from "@/components/ui/skeleton"
---
<div class="flex w-full max-w-sm flex-col gap-2">
<Skeleton class="h-12 w-12 rounded-full" />
<Skeleton class="h-4 w-full" />
<Skeleton class="h-4 w-3/4" />
</div>Installation
npx shadcn@latest add @fulldev/skeleton
Usage
import { Skeleton } from "@/components/ui/skeleton"
<Skeleton class="h-4 w-full" />
Example
---
import { Skeleton } from "@/components/ui/skeleton"
---
<div class="w-full max-w-sm rounded-lg border p-4">
<div class="flex items-center gap-3">
<Skeleton class="size-10 rounded-full" />
<div class="flex flex-1 flex-col gap-2">
<Skeleton class="h-4 w-32" />
<Skeleton class="h-3 w-24" />
</div>
</div>
</div>Notes
- Match the approximate size of the final content to reduce layout shift.
- Use
Skeletonfor loading states, not empty states. For no-data UI, use Empty.
API Reference
See the GitHub source code for more information on props.