Theme
Icon button
A button showing only an icon. Its label is a required prop.
Examples
Props
IconButton
A button showing only an icon. Its label is required, because the icon is not text.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | What the button does, read by screen readers: the icon alone says nothing to them. |
variant? | ButtonVariant | "quiet" | |
size? | "sm" | "md" | "md" | |
children | ReactNode | — | The icon, from |
Also takes 109 props it passes to the underlying React Aria component or element (events, ARIA attributes, state such as isDisabled), documented by React Aria.
Keyboard
| Key | Does |
|---|---|
| Enter or Space | Presses the button |
| Tab | Moves focus to the next control |
Accessibility
- The label becomes aria-label; pair it with a Tooltip so sighted users get it too.