Skip to the content

IconButton

IconButton is a Button that holds a single icon, with uniform padding and a circular shape. It shares Button's colors, variants and sizes. It has no visible text, so always pass label.
Actions

When to use

Use when
  • The action is recognizable by its icon alone — close, expand, settings, favorite.
  • Space is tight: toolbars, app bars, table rows, card headers.
Avoid when
  • The icon's meaning is not obvious — use Button with text, or add a Tooltip.
  • The control navigates to another page — use Link.
  • The icon is decorative — use Icon.

Usage

loading

Ghost clusters

variant="ghost" shows only the glyph at rest and a circular wash on hover, focus and press. Use it for groups of chrome actions. A linked IconButton gets the same wash instead of an underline.

<IconButton variant="ghost" size="small" icon={<Icon icon={cog} />} label="Settings" />
<IconButton variant="ghost" size="small" icon={<Icon icon={thumbsUp} />} label="Like" />

Sizes

size takes extraSmall, small, medium (default) or large. Every size is circular except extraSmall, which keeps a small radius so tiny glyphs do not look squashed.

<IconButton icon={<Icon icon={cog} />} size="extraSmall" label="Settings" />
<IconButton icon={<Icon icon={cog} />} size="large" label="Settings" />

While isLoading is true the icon is replaced by a Spinner, or by loadingComponent when you pass one.

Accessibility

  • Renders a native <button>; Enter and Space activate it. While isLoading, it reports aria-busy, stays focusable and ignores clicks.
  • label becomes the aria-label. Without it the button has no accessible name. A native aria-label you pass directly takes precedence.
  • Under forced colors (Windows High Contrast), the focus outline is restored with the system Highlight color.

Properties

See also