Skip to content

Icon Button

IconButton Props ​

IconButton inherits most Button props but does not expose isIconOnly, because it is always icon-only.

NameTypeDefaultDescription
labelstringrequiredAccessible name for the button.
variant'primary' | 'secondary' | 'ghost' | 'destructive''secondary'Visual hierarchy and semantic variant.
size'sm' | 'md' | 'lg''md'Square control size.
elevation'none' | 'low' | 'med' | 'high''none'Resting shadow depth for a standalone floating button.
isDisabledbooleanfalseDisables interaction. A tooltip switches this to aria-disabled so focus remains available.
isLoadingbooleanfalseShows loading state, sets aria-busy, and disables non-interruptible activation.
isInterruptiblebooleanfalseAllows clickAction to run again while earlier work is pending.
clickAction(event: MouseEvent) => void | Promise<void>—Action function that automatically drives pending state.
tooltipstring—Supplementary hint shown on hover and keyboard focus.
hrefstring—Renders the enabled root as a link when present.
widthnumber | string—Button width. Numbers become pixels; CSS strings are used as supplied.

These props are also inherited. See Button props for their definitions.

  • type.
  • name.
  • value.
  • form.
  • loadingLabel.
  • as.
  • target.
  • rel.

Slot ​

  • The default slot is required.
  • The default slot must contain one icon that represents the action.
  • IconButton does not display text.
  • IconButton does not provide an end slot.

Accessible name

Provide an accurate label. Without it, assistive technology cannot identify the button's purpose.

tooltip provides additional information. Do not use it instead of label.

Events ​

The click event passes a MouseEvent.

Template ref ​

IconButton exposes element. Its type is HTMLButtonElement | HTMLAnchorElement | HTMLElement | null.

Native attributes ​

The root element receives:

  • HTML attributes.
  • aria-* attributes.
  • data-* attributes.
  • class.
  • style.
  • Native event listeners.