Toggle Button
A two-state button that can be either on or off.
Features
- Full keyboard navigation.
- Can be controlled or uncontrolled.
Install the component from your command line.
Import the component.
Create your styled toggle button component from the primitive parts.
The toggle button.
Prop | Type | Default | Required |
---|---|---|---|
as | enum | button | |
defaultToggled | boolean | ||
toggled | boolean | ||
onToggledChange | function | ||
disabled | boolean |
Key | Description |
---|---|
Space | Activates/deactivates the toggle button. |
Enter | Activates/deactivates the toggle button. |