useToggleButton
Provides the behavior and accessibility implementation for a toggle button component. ToggleButtons allow users to toggle a selection on or off, for example switching between two states or modes.
Install#
- Yarn
- npm
Import#
API#
AriaToggleButtonProps#
Props for the toggle button.
ToggleState#
- State for the toggle button, as returned by useToggleState.
ButtonAria#
ref#
- Ref of Pressable/Touchable