Skeleton

Use to show a placeholder while content is loading. Size and shape come from your className.

Basic

Compose circles and bars to hint at loading content.

Installation

CLI
npx @sonojs/ui@latest add skeleton

Composition

structure
Skeleton

Usage

skeleton.tsx
import { Skeleton } from "@/components/ui/skeleton"

export function Example() {
  return <Skeleton className="h-4 w-[100px]" />
}

Props

PropTypeDefaultDescription
classNamestring—Set height, width, and radius (e.g. `h-4 w-full rounded-full`).
…div propsReact.ComponentProps<"div">—Native attributes pass through to the element.