The Switch component is used as an alternative for the Checkbox component, switch between enabled or disabled states.
Switch must always be accompanied by a label, and follows the same keyboard workflow as a checkbox.
size prop to change the size of the switch.
Switch background color#
You can change the checked background color of the switch by passing the
|The size of the switch.|
|The background color of the switch when checked.|
|The input name of the switch when used in a form.|
|The value of the switch.|
|The children of the switch.|
|The aria-label of the switch for accessibility.|
|The aria-labelledby of the switch for accessibility.|
Proudly made in 🇳🇬
Released under the MIT License.
Copyright © 2019 Segun Adebayo