Skeleton
Decorative placeholder (a fade, so it stays under reduced motion).
<div aria-busy="true" className="flex w-56 flex-col gap-2">
<Skeleton className="w-3/4" />
<Skeleton />
<Skeleton className="w-1/2" />
</div>Installation
npx shadcn@latest add https://sproutboat.com/ikada/r/skeleton.jsonThe CLI writes components/ikada/skeleton.tsx and merges the ikada theme into your CSS. Or take it from the package: import { Skeleton } from "@sproutboat/ikada";
Usage
import { Skeleton } from "@/components/ikada/skeleton";
<div aria-busy="true" className="flex w-56 flex-col gap-2">
<Skeleton className="w-3/4" />
<Skeleton />
<Skeleton className="w-1/2" />
</div>Examples
<div aria-busy="true" className="flex w-56 flex-col gap-2">
<Skeleton className="w-3/4" />
<Skeleton />
<Skeleton className="w-1/2" />
</div><Skeleton variant="line" />
<Skeleton variant="block" />
<Skeleton variant="circle" /><div aria-busy="true" className="flex items-center gap-3">
<Skeleton variant="circle" />
<div className="flex flex-1 flex-col gap-2">
<Skeleton className="w-24" />
<Skeleton className="w-40" />
</div>
</div>Props
| Prop | Type | Description |
|---|---|---|
| kind | "circle" | "line" | "block" | @deprecated Use `variant`; removed in 0.3.0. |
| variant | "circle" | "line" | "block" | null | — |
Also takes every prop of Omit<ComponentProps<"span">, "children">, VariantProps<typeof skeletonStyles>.
Source: src/components/skeleton.tsx