# Skeleton

<FrameworkCodeSwitcher>
  <div slot="astro">
```astro
---
import { Skeleton } from "@/components/starwind/skeleton";
---

<div class="flex items-center space-x-4">
  <Skeleton class="h-12 w-12 rounded-full" />
  <div class="space-y-2">
    <Skeleton class="h-4 w-[250px]" />
    <Skeleton class="h-4 w-[200px]" />
  </div>
</div>
```
  </div>
  <div slot="react">
```tsx
import { Skeleton } from "@/components/starwind/skeleton";

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

## Installation

```bash
npx starwind@latest add skeleton
```

## Usage

### Card Skeleton

```astro
---
import { Skeleton } from "@/components/starwind/skeleton";
---

<div class="flex flex-col space-y-3">
  <Skeleton class="h-[125px] w-[250px] rounded-xl" />
  <div class="space-y-2">
    <Skeleton class="h-4 w-[250px]" />
    <Skeleton class="h-4 w-[200px]" />
  </div>
</div>
```

### Table Skeleton

```astro
---
import { Skeleton } from "@/components/starwind/skeleton";
---

<div class="space-y-2 w-[250px]">
  <Skeleton class="h-8 w-full" />
  <Skeleton class="h-8 w-full" />
  <Skeleton class="h-8 w-full" />
  <Skeleton class="h-8 w-full" />
  <Skeleton class="h-8 w-full" />
</div>
```

## Framework Availability
Skeleton is available for Astro and React.
Astro available; React available
| Framework | Status | Notes |
| --- | --- | --- |
| Astro | available | - |
| React | available | - |
## API Reference
### Skeleton
- Inherits div attributes. Omits `children`.

## Changelog

### v1.3.0

- Added contract-generated Astro and React implementations while preserving the component's existing public API and styling.

### v1.2.2 

- Refactor tailwind variants functions into separate `variants.ts` file

### v1.2.0

- style updates

### v1.1.0

- Add `data-slot` attribute to enable global styling updates

### v1.0.0

- Initial release with starwind v1.7.0