Components
Skeleton
Solid tonal placeholder block with a subtle pulse animation while content is loading.
import { Skeleton } from "@/components/ui/skeleton";
export default function Particle() {
return (
<div className="flex w-72 items-center gap-4">
<Skeleton className="size-12 shrink-0 rounded-full" />
<div className="flex-1 space-y-2">
<Skeleton className="h-4 w-full" />
<Skeleton className="h-4 w-3/4" />
</div>
</div>
);
}
Installation
pnpm dlx shadcn@latest add @taut-ui/skeleton
Usage
import { Skeleton } from "@/components/ui/skeleton"<div className="flex flex-col gap-3">
<Skeleton className="h-6 w-48" />
<Skeleton className="h-4 w-full" />
<Skeleton className="h-4 w-3/4" />
</div>Examples
Card
import { Skeleton } from "@/components/ui/skeleton";
export default function Particle() {
return (
<div className="flex w-72 flex-col gap-3">
<Skeleton className="h-36 w-full rounded-2xl" />
<div className="space-y-2">
<Skeleton className="h-4 w-4/5" />
<Skeleton className="h-4 w-1/2" />
</div>
</div>
);
}
List
import { Skeleton } from "@/components/ui/skeleton";
export default function Particle() {
return (
<div className="flex w-80 flex-col gap-3.5">
{["row-1", "row-2", "row-3"].map((id) => (
<div className="flex items-center gap-3" key={id}>
<Skeleton className="size-10 shrink-0 rounded-xl" />
<div className="flex-1 space-y-1.5">
<Skeleton className="h-3.5 w-3/4" />
<Skeleton className="h-3 w-1/2" />
</div>
<Skeleton className="h-5 w-12 shrink-0 rounded-full" />
</div>
))}
</div>
);
}
API Reference
Skeleton
Renders a <div> placeholder with a pulse animation and solid tonal background.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Sizing, border-radius, and layout classes |
...props | React.ComponentProps<"div"> | - | All standard <div> attributes |