Files
shadcn-ui/apps/v4/components/skeleton-demo.tsx
2025-02-05 10:38:28 +04:00

30 lines
1007 B
TypeScript

import { Card, CardContent, CardHeader } from "@/registry/new-york-v4/ui/card"
import { Skeleton } from "@/registry/new-york-v4/ui/skeleton"
export function SkeletonDemo() {
return (
<div className="flex w-full max-w-3xl flex-col gap-6">
<div className="flex items-center gap-4">
<Skeleton className="size-10 shrink-0 rounded-full" />
<div className="grid gap-2">
<Skeleton className="h-4 w-[150px]" />
<Skeleton className="h-4 w-[100px]" />
</div>
</div>
<div className="flex w-full flex-col gap-4 md:flex-row">
{Array.from({ length: 3 }).map((_, index) => (
<Card key={index} className="w-full">
<CardHeader>
<Skeleton className="h-4 w-2/3" />
<Skeleton className="h-4 w-1/2" />
</CardHeader>
<CardContent>
<Skeleton className="aspect-square w-full" />
</CardContent>
</Card>
))}
</div>
</div>
)
}