Live demo
Demo source
Use an icon button for a quick, familiar action where a text label would not fit, such as copy, download or close.
Anatomy
A square orange icon button showing a people icon. Callout 1 marks the icon, callout 2 the container.
- Icon shows the action; choose it with
name. - Container sets the shape and size.
States and themes
Default, hover, keyboard-focus, pressed and disabled styles are available in
Spark and Ocean. active can mark a lasting active state; pressing the button
also has a momentary visual response. The design page lists read-only, but
the component has no read-only prop. Use disabled for an unavailable action.
Emphasis, size and shape
Four emphasis levels, high (default), medium, low and lower, signal how
important or frequent an action is.
Sizes run from xs to lg (md by default). The shape is square
(default) or rounded, which the design guidelines call circular.
loading replaces the icon with a spinner and disables the button until it
is cleared; disabled prevents interaction.
Accessibility
Without a label, the button is announced by its icon name, such as
"download-icon". Always set an aria-label that names the action, and add a
tooltip when the icon may be unfamiliar.
Tab reaches an enabled icon button, and Enter or Space activates it. A tooltip explains an unfamiliar symbol, but does not replace the button's accessible action name.
Guidelines
- Choose universally understood icons.
- Use emphasis and placement to show importance.
- Avoid crowding many icon buttons close together.