Icon Button
An icon-only button for compact, labeled actions like adding, editing, or closing.
An aria-label is required: icon-only buttons have no visible text, so the accessible name comes from it.
Show codeHide code
Installation
import { Icon } from "@makeplane/propel/components/icon";
import { IconButton } from "@makeplane/propel/components/icon-button";Usage
import { Icon } from "@makeplane/propel/components/icon";
import { IconButton } from "@makeplane/propel/components/icon-button";
import { AddOutline } from "@makeplane/propel/icons";
export default function BasicDemo() {
return (
<IconButton
variant="primary"
size="sm"
aria-label="Add item"
icon={<Icon icon={AddOutline} />}
/>
);
}Examples
Tooltip
IconButton shows its aria-label in a tooltip on hover and keyboard focus by default. Set
showTooltip={false} to hide it. For a different label, position, shortcut, or delay, wrap the button
in Tooltip and set showTooltip={false} so only one popup appears.
Variants
Variant sets the visual weight and palette: primary, secondary, tertiary, and ghost, plus
danger (solid fill) and danger-outline (bordered outline) for destructive actions.
Show codeHide code
Sizes
size sets a square box — xs 20 / sm 24 / md 28 / lg 32 px. The glyph runs one step
larger than a labelled control at the same rung (14 / 16 / 16 / 20 px), because there is no
label to balance it. xs is under WCAG 2.5.8’s 24px floor and ships a transparent ring that
brings the pointer target to 24×24 without moving a painted pixel — which is also why it is
unavailable inside contiguous groups, where adjacent rings would intersect.
Show codeHide code
Loading
The loading state shows a spinner, sets aria-busy, and blocks interaction.
Show codeHide code
Disabled
disabled is the hard, non-focusable disabled state; unlike loading, it removes the button from the tab order.
Show codeHide code
API Reference
IconButton
The ready-made icon-only button: grafts Base UI's Button behavior onto the square IconButton
box, filling it with the provided icon element and swapping in a spinner while loading. It can
render as <a> via nativeButton={false} + render={<a href=… />} when needed. An aria-label
is REQUIRED for the accessible name and appears in a tooltip by default.