CodeAI

Icon Toggle

Not in Production

Icon-only binary on/off control. Optional label + secondToggle covers Figma Icon Toggle + Label (up to 2 toggles).

Appearance

Content

State

Accessibility

Dual toggle (playground)

Props — IconToggle
View MUI docs
PropTypeDescription
size"large" | "medium" | "small" | "extraSmall"Toggle height. Default medium (40).
color"primary" | "secondary" | "brand" | "success" | "error"Icon color when pressed.
iconNameFaIconNameFont Awesome icon for the toggle.
pressedbooleanControlled on/off state (Figma isOn).
defaultPressedbooleanInitial pressed state (uncontrolled).
onPressedChange(pressed: boolean) => voidCalled when pressed state changes.
labelReactNodeOptional label beside the toggle (Icon Toggle + Label).
secondToggle{ iconName; color?; pressed?; defaultPressed?; onPressedChange?; aria-label; disabled? }Second toggle for dual layouts (e.g. thumbs up/down).
exclusivebooleanWith secondToggle: only one toggle can be pressed at a time.
disabledbooleanDisables interaction.
aria-labelstringAccessible name when there is no visible label.