IconButton
A square button for icon-only actions. The label is required and becomes the accessible name.
Example
<IconButton label="Search">
<svg ...>...</svg>
</IconButton>
<IconButton label="Settings" variant="ghost" size="sm">
<svg ...>...</svg>
</IconButton>Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Accessible name (required). |
href | string | - | Renders a link; otherwise a button. |
variant | secondary | ghost | secondary | Visual style. |
size | sm | md | md | Button size. |
disabled | boolean | false | Disabled state. |
Accessibility
- Always pass a meaningful
label; icons alone convey nothing. - Link + disabled uses
aria-disabledsince links have no disabled state.