generic-switch
WAI ARIA Practices
A switch is a button that toggles between true or false.
API:
| name |
detail |
| checked-changed |
boolean |
| name |
type |
| disabled |
boolean |
| checked |
boolean |
| label |
string |
| name |
type |
| checked |
boolean |
| name |
description |
| --generic-switch-focus |
Customizes the focus styles of the thumb |
| name |
description |
| label |
|
| thumb |
|
| track |
|
| button |
|
| name |
description |
| default |
Provide a label node as lightdom |
Usage:
The switch component requires a label, which you can provide as a textnode. You can see an example down below.
Default:
Show code
Default
Custom label:
Show code
Custom label
Disabled:
Show code
Disabled
Checked:
Show code
Checked
Checked and disabled:
Show code
Checked and disabled
With a long text in a small place:
Show code
Very very loooong text in a small space