npm

Skeleton

Skeleton is a placeholder shape that stands in for content while it loads.

Installation

pnpm add @viliha/vui-ui

Then import from @viliha/vui-ui/skeleton.

Usage

Size it with utility classes to match the content it stands in for while loading.

skeleton-demo.tsx
import { Skeleton } from "@viliha/vui-ui/skeleton";

export function Example() {
  return (
    <div className="flex items-center gap-4">
      <Skeleton className="size-12 rounded-full" />
      <div className="space-y-2">
        <Skeleton className="h-4 w-[200px]" />
        <Skeleton className="h-4 w-[160px]" />
      </div>
    </div>
  );
}