# Skeleton

> Solid tonal placeholder block with a subtle pulse animation while content is loading.

Canonical URL: https://taut-ui.com/docs/components/skeleton

```tsx
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 [#installation]

**CLI**

```bash
npx shadcn@latest add https://taut-ui.com/r/skeleton.json
```

**Manual**

- Copy and paste the following code into your project.

```tsx title="components/ui/skeleton.tsx"
import type React from "react";
import { cn } from "@/lib/utils";

export interface SkeletonProps extends React.ComponentProps<"div"> {}

export function Skeleton({
  className,
  ...props
}: SkeletonProps): React.ReactElement {
  return (
    <div
      className={cn(
        "animate-pulse rounded-lg bg-[color-mix(in_oklab,var(--color-card),var(--color-foreground)_8%)] motion-reduce:animate-none",
        className,
      )}
      data-slot="skeleton"
      {...props}
    />
  );
}
```

- Update the import paths to match your project setup.

## Usage [#usage]

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

```tsx
<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 [#examples]

### Card [#card]

```tsx
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 [#list]

```tsx
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 [#api-reference]

### Skeleton [#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 |
