# Icon button

> Square icon-only control for compact actions (close, more, toggle). No dedicated NxKit wrapper; apply the class directly.

- Group: Core
- Status: stable
- Aliases: iconbtn
- HTML page: https://design.ipmnx.com/components/icon-button/
- Spec: https://design.ipmnx.com/design/#nx-icon-button

## Preview

**Default + disabled** Icon-only button with a required aria-label.

```html
<button class="nx-iconbtn" aria-label="More options">⋯</button>
<button class="nx-iconbtn" aria-label="Locked" disabled>×</button>
```

```tsx
<button className="nx-iconbtn" aria-label="More options">⋯</button>
<button className="nx-iconbtn" aria-label="Locked" disabled>
  ×
</button>
```

## API

### Classes

| Class | Description |
| --- | --- |
| `.nx-iconbtn` | Square icon-only button, --nx-iconbtn-size |
| `.has-text` | Showcase-only variant for a short-word toolbar button (e.g. RTL) |

## States

### disabled

```html
<button class="nx-iconbtn" aria-label="Locked" disabled>×</button>
```

## Accessibility

- Always pass aria-label: the glyph carries no accessible name on its own.
- `:focus-visible` shows the ink outline; `:disabled` sets pointer-events:none.

## Do / Don't

- Do: Always give it an aria-label.
- Don't rely on a tooltip alone for the accessible name.

## Related

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

---

Source: registry.js (NX Design System)
