IconButton
IconButton
Section titled “IconButton”Category: Forms & inputs
<IconButton aria-label="Close"><CloseIcon /></IconButton><IconButton aria-label="Delete" tone="danger" variant="soft"><TrashIcon /></IconButton>Install: @helix-ui/core
import { IconButton } from '@helix-ui/core';status: stable · since: 0.1.0
Tags: clickable, icon-only, compact, action
Live playground
Section titled “Live playground”Open the full editor or source on GitHub.
Anatomy
Section titled “Anatomy”[ ⊙ ] ← square button, icon onlyLayout
Section titled “Layout”- display —
inline-block - width —
content - height —
content - intrinsicSize —
~28/36/44px square (sm/md/lg) - stackable —
true - fullBleed —
false
Visual
Section titled “Visual”A square button (radius.md) sized for an icon child. Same variants and tones as Button. Requires aria-label.
| Name | Type | Default | Description |
|---|---|---|---|
aria-label |
string |
— | Required. Names the action — screen readers have no visible text to read. |
variant |
'solid' | 'soft' | 'ghost' | 'outline' |
ghost |
Visual style. |
tone |
'brand' | 'neutral' | 'danger' |
neutral |
Color intent. |
size |
'sm' | 'md' | 'lg' |
md |
Square size — 32 / 40 / 48 px. |
...rest |
ButtonHTMLAttributes<HTMLButtonElement> |
— | Standard button attributes are forwarded. |
- children — the icon node
Tokens used
Section titled “Tokens used”color.bg.action.brand.default, color.bg.action.brand.hover, color.bg.action.brand.subtle, color.bg.action.neutral.default, color.bg.action.neutral.hover, color.bg.action.danger.default, color.bg.action.danger.hover, color.bg.action.danger.subtle, color.bg.surface.default, color.text.primary, color.text.on.brand, color.text.on.danger, color.text.action.brand, color.text.action.danger, color.border.default, color.border.strong, color.border.focus, radius.md
Accessibility
Section titled “Accessibility”Role: button
Notes
aria-labelis required. TypeScript enforces it.- For destructive icon-only actions, include a Tooltip describing what the action does.
Composes with
Section titled “Composes with”| Component | Relation | Note |
|---|---|---|
Tooltip |
wraps |
Wrap with Tooltip to expose what the icon means. |
Button |
alternative |
Use Button when there is a text label. |
ChatHeader |
child |
Common in right-aligned actions. |
Prompt examples
Section titled “Prompt examples”These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.
menu trigger icon
Section titled “menu trigger icon”“three-dot icon button with tooltip”
<TooltipTrigger> <IconButton aria-label="More"> <MoreIcon /> </IconButton> <Tooltip>More</Tooltip></TooltipTrigger>