Draft. Proposed from the survey of 18 design systems and not yet approved. It is in the registry so teams can try it; the API may still change before approval.
When to use
- In toolbars, table rows, card headers and editors, where a label would not fit.
- For actions whose icon is well known: close, more actions, refresh, delete, copy, filter.
When not to use
- For the main action of a screen or dialog. Use a button with a label.
- When the icon is not obvious. Add the label instead of a tooltip.
Anatomy
| Part | Required | Notes |
|---|---|---|
| Container | Yes | A square of the button height: 24, 32 or 40 px. |
| Icon | Yes | Lucide, size.icon.default (16 px), decorative. |
| Accessible name | Yes | The tooltip, set as its label (<Tooltip relationship="label">), so the name is written once and shows on hover and focus. |
Variants and states
Icon button uses the Button variants: Subtle by default, Default where it must look like a control, Subtle danger for delete in a row. States are the Button states, including toggle on (aria-pressed="true"). Icon-only buttons in a row sit 12 px apart (space.150).
Preset buttons
Two icon buttons have a fixed icon, label and behaviour. They are configurations of Icon button, not separate components.
| Preset | Icon | Name | Behaviour |
|---|---|---|---|
| Close | x |
“Close”, or “Close” plus what it closes when a page has several | Subtle. Top right of dialogs and drawers; Esc closes too. Small (24 px) inside tags and banners. |
| Copy | copy |
“Copy” plus what it copies, such as “Copy API key” | Subtle, small next to the value. After a click the icon turns into check for 2 seconds and a polite live region says “Copied”. No toast. |
Accessibility
- The name is required. A screen reader reads the tooltip text as the button’s name; the icon is
aria-hidden. Without a tooltip, put the name inaria-label. - The tooltip repeats the name; it never holds extra information.
- The tap area grows to 44 px on touch screens while the visible square stays the same.