- Implementation
Common Examples
To use theButtonToggle, pass a required label and control selection with
React Aria’s isSelected and onChange. Use defaultSelected instead for
uncontrolled selection. The kit forbids children.label becomes its accessible name
and tooltip. Use { icon, position } to show the label beside the icon.size is "medium", "small", or "xsmall". On coarse pointers,
xsmall promotes to a 40×40 minimum touch target.React Accessibility
- React Aria provides keyboard, pointer, focus-visible, and selection behavior.
labelis always required, including for icon-only toggles.- Use a short imperative label such as “Bold” or “List view.”