# Skeleton

> Shimmering placeholder block for content that hasn't loaded yet.

- Group: Feedback
- Status: stable
- Aliases: shimmer
- HTML page: https://design.ipmnx.com/components/skeleton/
- Spec: https://design.ipmnx.com/design/#nx-skeleton

## Preview

**Text line placeholders**

```html
<span class="nx-skeleton" style="display:block;height:12px;
    width:80%"></span>
<span class="nx-skeleton" style="display:block;height:12px;
    width:55%"></span>
```

```tsx
<NxSkeleton height={12} width="80%" />
<NxSkeleton height={12} width="55%" />
```

## API

### React props (NxKit)

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `width` | `number\|string` | `"100%"` |   | CSS width. |
| `height` | `number\|string` | `14` |   | CSS height. |
| `radius` | `number` | `8` |   | Border radius. |

### Classes

| Class | Description |
| --- | --- |
| `.nx-skeleton` | Surface-2 bg, shimmer sweep, reduced-motion aware |

## Accessibility

- Rendered aria-hidden (NxSkeleton sets it). Pair with a visually-hidden text announcement elsewhere (e.g. a table caption) if the loading state itself needs to be announced.

## Do / Don't

- Do: Match the skeleton's shape to the real content it replaces.
- Don't leave skeletons on screen past the real load. Always swap to content or an empty state.

## Related

- [Progress](https://design.ipmnx.com/components/progress.md)
- [Table](https://design.ipmnx.com/components/table.md)

---

Source: registry.js (NX Design System)
