# Spinner

> Small rotating ring for an inline or button-embedded loading indicator.

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

## Preview

**Standalone**

```html
<span class="nx-spinner" role="img" aria-label="Loading"></span>
```

```tsx
<span className="nx-spinner" role="img" aria-label="Loading" />
```

## API

### Classes

| Class | Description |
| --- | --- |
| `.nx-spinner` | 18×18 ring, currentColor border-top, spin animation |

## Accessibility

- Always carries role="img" + aria-label (or is purely decorative alongside visible "Saving…" text). A bare spinning ring has no accessible name on its own.
- Respects prefers-reduced-motion (animation removed, ring stays static).

## Do / Don't

- Do: Pair with an aria-label or adjacent visible loading text.
- Don't use it as the only indicator inside a button without also setting aria-busy on the button.

## Related

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

---

Source: registry.js (NX Design System)
