"use client"
import { Skeleton } from "@/components/ui/preskok-ui/skeleton"
export function SkeletonDemo() {
return (
<div className="space-y-6">
{/* Vehicle Card Skeleton */}
<div className="space-y-3 rounded-lg border p-4">
<div className="flex items-center space-x-4">
<Skeleton className="h-16 w-24 rounded" />
<div className="flex-1 space-y-2">
<Skeleton className="h-4 w-3/4" />
<Skeleton className="h-3 w-1/2" />
<Skeleton className="h-3 w-1/3" />
</div>
</div>
<div className="flex items-center justify-between">
<Skeleton className="h-6 w-20" />
<Skeleton className="h-8 w-24 rounded" />
</div>
</div>
{/* Vehicle List Skeleton */}
<div className="space-y-3">
<Skeleton className="h-6 w-48" />
{Array.from({ length: 4 }).map((_, i) => (
<div
key={i}
className="flex items-center space-x-3 rounded border p-3"
>
<Skeleton className="h-12 w-16 rounded" />
<div className="flex-1 space-y-2">
<Skeleton className="h-4 w-40" />
<Skeleton className="h-3 w-24" />
</div>
<Skeleton className="h-4 w-16" />
</div>
))}
</div>
{/* Dashboard Stats Skeleton */}
<div className="grid grid-cols-3 gap-4">
{Array.from({ length: 3 }).map((_, i) => (
<div key={i} className="space-y-2 rounded-lg border p-4">
<Skeleton className="h-3 w-20" />
<Skeleton className="h-8 w-16" />
<Skeleton className="h-3 w-16" />
</div>
))}
</div>
</div>
)
}
Installation
CLI
Manual
pnpmnpmyarnbunpnpm dlx @preskok-org/ui@latest add skeleton
Usage
import { Skeleton } from "@/registry/preskok/ui/preskok-ui/skeleton"
export function SkeletonDemo() {
return (
<div className="space-y-2">
<Skeleton className="h-4 w-[250px]" />
<Skeleton className="h-4 w-[200px]" />
</div>
)
}