IconButton

Markdown

An icon-only button with a required label, shown as a hint on hover and focus.

Good to know

  • The hint opens on hover and on keyboard focus, not when focus arrives from a click or a script.
Use it for
A frequent action where the icon is universally understood and space is tight, such as close or copy.
Not for
Primary or unfamiliar actions; a visible label is clearer. Try Button.

IconButton preview

Loading example…

Installation

npm install @stackunseen/ui
import { IconButton } from '@stackunseen/ui';
Styles: @stackunseen/ui/styles.css

Usage and props

Use familiar icons for secondary actions and give each a clear label. Important actions deserve a visible word.

Supported inputs

This is the public signature used by this example. Open Code to see how the values and callbacks fit together.

label: string · icon: IconName · Button props except children, aria-label and size
How state and callbacks work
All props

Loading…

For your coding agent

Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.

Contract
label: string · icon: IconName · Button props except children, aria-label and size
Keeps honest
Use familiar icons for secondary actions and give each a clear label. Important actions deserve a visible word.
MCP
read_component "IconButton" on the docs endpoint
Open the Markdown file

Keyboard and customization

Keyboard

Tab reveals the label hint. Enter or Space activates the button; Escape dismisses the hint. A toggle should expose aria-pressed.

Customization

Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio