Skeleton
Use skeletons to provide a low-fidelity representation of your content while it's loading.Copy Markdown
Preview
The Skeleton component provides a fluid placeholder for your UI elements. Below is an overview of all variants and common layouts.
Profile Layout
Perfect for user profiles, comments, or team member sections.
Feed Post
Ideal for social media feeds, blog lists, or card-heavy dashboards.
Grid Cards
Use this for product listings, portfolios, or data-driven grids.
Installation
Automatic (CLI)
npx shadcn@latest add https://nurav-ui.vercel.app/r/skeleton.jsonManual Setup
Install Dependencies
npm install motion clsx tailwind-mergeCreate Component
Copy the following code into your project (e.g., components/nurav-ui/Skeleton.tsx).
Examples
Pulse Animation
The default animation that creates a soft, breathing effect.
<Skeleton className="w-[100px] h-4" animation="pulse" />Shimmer Animation
A linear animated gradient that sweeps across the element, common in high-end apps.
<Skeleton className="w-full h-32" animation="shimmer" />Custom Shapes
Since it uses Tailwind classes, you can easily create circles, squares, or complex rounded shapes.
<Skeleton className="h-20 w-20 rounded-full" />
<Skeleton className="h-4 w-1/4 rounded-none" />