Skip to main content

Common Examples

To use the ButtonToggle, pass a required label and control selection with isSelected and onChange. Use defaultSelected instead for uncontrolled selection. The kit forbids children.
A bare icon creates an icon-only toggle. label becomes its accessible name. Use { icon, position } to show the label beside the icon.
size is "medium", "small", or "xsmall".

Accessibility

  • The control uses accessibilityRole="togglebutton" and accessibilityState.checked for the selected state.
  • label is always required, including for icon-only toggles, and is set as accessibilityLabel.
  • Use a short imperative label such as “Bold” or “List view.”
Last modified on September 1, 2026