Skip to content

Skeleton

Decorative placeholder (a fade, so it stays under reduced motion).

0.7 kB gzipSource Registry JSON

Lines

Installation

npx shadcn@latest add https://sproutboat.com/ikada/r/skeleton.json

The 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

Lines

Siblings start 120ms apart, so a block of lines swells top to bottom. Decorative: mark the region aria-busy.

Kinds

Line is the default; block stands in for a chart or image, circle for an avatar.

Sprout row

Keep the layout of the loaded row so nothing jumps when the data arrives.

Props

SkeletonProps
PropTypeDescription
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