Skeleton

Loading placeholder: a rounded muted block with a pulse animation. Size and shape it with classes to stand in for text lines, avatars or cards while content loads.

Open the preview in a new tab
import { Skeleton } from "@/components/ui/skeleton"

/** Skeleton of an image and two lines of text. */
export default function SkeletonDemo() {
  return (
    <div className="flex w-full max-w-sm flex-col gap-4">
      <Skeleton className="h-40 w-full rounded-sm" />
      <div className="flex flex-col gap-2">
        <Skeleton className="h-4 w-2/3" />
        <Skeleton className="h-4 w-1/3" />
      </div>
    </div>
  )
}

Installation

pnpm dlx shadcn add @01orbital/skeleton
npx shadcn add @01orbital/skeleton
yarn shadcn add @01orbital/skeleton
bunx --bun shadcn add @01orbital/skeleton

Add the @01orbital registry to components.json once (install guide), then run the command.

It lands at components/ui/skeleton.tsx, as source you own and edit.

Dependencies

npm: cn. The CLI installs them for you.

No other registry pieces.

On this page