Skip to main content
IconButton composes Button with a square surface. Pass the icon as children and provide an aria-label describing the action. Icon content is decorative and hidden from assistive technology.

Usage

Sizes are sm (24px) and md (32px). The defaults are md, outline, and neutral. Variants and colors match Button.

Tooltip

Add tooltip to show text on hover and keyboard focus. Keep aria-label as the accessible name of the action. Disabled and loading buttons retain hover tooltips.
The tooltip defaults to the bottom, with a 1000ms delay and a 5px offset. Use tooltipPlace, tooltipDelay, and tooltipOffset to adjust it. Omitting tooltip renders the button directly.

State ownership

Your application supplies loading and disabled. Both prevent activation. Loading preserves the square dimensions and accessible label. The button does not track a selected value or set loading automatically after a click. Native keyboard focus follows the browser; use aria-pressed when your application owns a toggle state.

Grouped actions

ButtonGroup supplies size, variant, color, and adjoining corners. Individual buttons do not need a position prop. Use href to render an anchor. The caller can provide a custom render element, including its own router link. Supply href to select link semantics; the renderer must preserve an anchor. Without href, preserve a native button. Neither nativeButton nor role is part of the public button interface. Disabled links cannot activate. Routing stays in the application. Native attributes, event handlers, refs, and render composition pass through to Button. The default is type="button"; set type="submit" explicitly for form submission.

Props

string
required
Required accessible name describing the action.
string | ((state: ButtonState) => string | undefined)
CSS class applied to the element, or a function that returns a class based on the component’s state.
"neutral" | "accent" | "danger" | "success"
Semantic color of the button.
boolean
Adds a shadow to the button.
boolean
default:"false"
Whether the button should be focusable when disabled.
boolean
Shows a loading indicator and disables activation while preserving the button width.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ButtonState>
Caller-supplied root element or renderer. Preserve a native button, or an anchor when href is set. Router integration belongs to the caller.
"sm" | "md"
Square button size: sm (24px) or md (32px).
CSSProperties | ((state: ButtonState) => CSSProperties | undefined)
Style applied to the element, or a function that returns a style object based on the component’s state.
string
Text displayed when hovering or focusing the button.
"0ms" | "300ms" | "500ms" | "1000ms"
default:"TooltipDelay.longDelay"
Delay before showing the tooltip.
number
default:"5"
Distance in pixels between the button and the tooltip.
"top" | "left" | "right" | "bottom"
default:"TooltipPosition.Bottom"
Preferred placement of the tooltip relative to the button.
"solid" | "outline" | "ghost" | "soft"
Visual treatment of the button surface.