- Implementation
Common Examples
To use theButtonToggle, pass a required label and control selection with isSelected and onChange. Use defaultSelected instead for uncontrolled selection. The kit forbids children.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"andaccessibilityState.checkedfor the selected state. labelis always required, including for icon-only toggles, and is set asaccessibilityLabel.- Use a short imperative label such as “Bold” or “List view.”