Usage
Examples
Card skeleton
Table skeleton
Text block skeleton
Props
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes to control size, shape, and styling |
import { Skeleton } from "src/design/product/components/Skeleton";import { Skeleton } from "src/design/product/components/Skeleton";
export default function SkeletonDemo() { return ( <div className="flex items-center space-x-4"> <Skeleton className="size-12 rounded-full" /> <div className="space-y-2"> <Skeleton className="h-4 w-48" /> <Skeleton className="h-4 w-32" /> </div> </div> );}import { Skeleton } from "src/design/product/components/Skeleton";
export default function CardSkeletonDemo() { return ( <div className="flex flex-col space-y-3"> <Skeleton className="h-32 w-full rounded-lg" /> <div className="space-y-2"> <Skeleton className="h-4 w-3/4" /> <Skeleton className="h-4 w-1/2" /> </div> </div> );}import { Skeleton } from "src/design/product/components/Skeleton";
export default function TableSkeletonDemo() { return ( <div className="w-full space-y-2"> {[...Array(4)].map((_, i) => ( <div key={i} className="flex items-center space-x-4"> <Skeleton className="h-4 w-1/4" /> <Skeleton className="h-4 w-1/3" /> <Skeleton className="h-4 w-1/4" /> <Skeleton className="h-4 w-16" /> </div> ))} </div> );}import { Skeleton } from "src/design/product/components/Skeleton";
export default function TextSkeletonDemo() { return ( <div className="w-full space-y-2"> <Skeleton className="h-4 w-full" /> <Skeleton className="h-4 w-full" /> <Skeleton className="h-4 w-4/5" /> </div> );}| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes to control size, shape, and styling |