Usage
IconToggle expresses a binary state (muted/unmuted, pinned/unpinned, visible/hidden) in a single square control. It belongs in toolbars and inspector chrome where labeled buttons would crowd the layout—similar to platform toggle icons that must still announce their outcome clearly to assistive technology. Because the glyph does the signalling, choose the pattern only when the icon is universally understood or the state lives next to another signal that clarifies it (a persistent sidebar open/closed state, a map visibility toggle shown in the legend).
SegmentedControl or Select.Button with Modal confirmation.Switch or Checkbox.type={IconToggleType.Secondary} renders a compact toolbar toggle sized for floating toolbars—for example, the four mode toggles inside the staff panel's FAB toolbar. Unchecked uses the Alt icon color with a subtle hover background; checked fills the control with --color-intent-accent-bg and paints the glyph with --color-icon-base.
IconToggle ships with the standard icon-toggle corner radius by default across every IconToggleType. Pass the boolean pill prop to opt in to a fully rounded (pill / circular) border radius for floating toolbars and FAB-style controls (e.g. the staff panel FAB toolbar). pill composes with any IconToggleType; combine it with type={IconToggleType.Secondary} to reproduce the FAB-toolbar variant, which pairs naturally with IconButton's pill prop.
title and tooltip describe the result of clicking, not the glyph: "Mute microphone", not "Microphone icon". Localize with formatMessage.Do
IconToggle for toolbars and compact contexts in dispatch overlays.Don't
Keyboard operable with a visible focus ring, the correct aria-pressed state for the button's toggle semantics, and announced state changes. See Accessibility for the full contract.