- Docs
- Components
- Actions
Icon button
An action shown as an icon. Its name is required, and shows as its tooltip.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<button>Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Playground
Every prop, live, and the code it takes.
Icon
Variant
Tone
Size
Tooltip
Tooltip side
import { PencilIcon } from "@qeetrix/icons";
import { IconButton } from "@qeetrix/react";
<IconButton icon={PencilIcon} aria-label="Edit user" />02
Variants and tones
Ghost by default. Soft or solid only for the one action a region leads with.
<Stack gap="md">
<Inline gap="sm">
<IconButton icon={PencilIcon} aria-label="Edit" />
<IconButton variant="soft" icon={PencilIcon} aria-label="Edit" />
<IconButton variant="solid" icon={PencilIcon} aria-label="Edit" />
</Inline>
<Inline gap="sm">
<IconButton tone="danger" icon={TrashIcon} aria-label="Remove" />
<IconButton tone="danger" variant="soft" icon={TrashIcon} aria-label="Revoke" />
<IconButton tone="danger" variant="solid" icon={TrashIcon} aria-label="Delete" />
</Inline>
<Inline gap="sm">
<IconButton tone="neutral" icon={SettingsIcon} aria-label="Settings" />
<IconButton tone="neutral" icon={EllipsisIcon} aria-label="More actions" />
<IconButton tone="neutral" icon={XIcon} aria-label="Close" />
</Inline>
</Stack>03
Sizes
Square, at a control's height in the region's density.
<Inline gap="sm" align="center">
<IconButton size="sm" icon={SettingsIcon} aria-label="Settings, small" />
<IconButton size="md" icon={SettingsIcon} aria-label="Settings, medium" />
<IconButton size="lg" icon={SettingsIcon} aria-label="Settings, large" />
</Inline>04
Tooltips
Its name shows on hover and focus. Replace the text, move it, or hide it beside visible words.
usr_01J8K2M4PQ
<Inline gap="md" align="center">
<IconButton icon={DownloadIcon} aria-label="Download invoice" tooltip="Download INV-2026-0042 (PDF)" />
<IconButton icon={RefreshCwIcon} aria-label="Refresh sessions" tooltipSide="bottom" />
<Inline gap="xs" align="center">
<Text mono>usr_01J8K2M4PQ</Text>
<IconButton icon={CopyIcon} aria-label="Copy user ID" tooltip={false} />
</Inline>
</Inline>05
Loading and disabled
Loading swaps the icon for a spinner. Disabled stays focusable, so its tooltip can say why.
<Inline gap="sm">
<IconButton icon={RefreshCwIcon} aria-label="Refresh sessions" loading />
<IconButton icon={TrashIcon} aria-label="Delete workspace: only an owner can" disabled />
</Inline>06
In a row
A row's own actions: neutral ghosts, the destructive one last.
Priya Sharma
<Inline gap="md" align="center" justify="between">
<Text>Priya Sharma</Text>
<Inline gap="xs">
<IconButton tone="neutral" icon={PencilIcon} aria-label="Edit Priya Sharma" />
<IconButton tone="neutral" icon={CopyIcon} aria-label="Copy Priya's email" />
<IconButton tone="danger" icon={TrashIcon} aria-label="Remove Priya Sharma" />
</Inline>
</Inline>