Switch
A Switch is <b>binary</b> and work as a digital on/off button. Use when two states are <b>opposite</b> and to trigger immediate changes in the system.
Controlled
The selection state can be controlled by using the checked
/onChange
props.
The value
prop represents the underlying submission value of the switch when it is checked.
The switch is Off
Custom colors
You can use the color
prop to style the color of the switch.
Custom switch
A custom switch can be built by using the underlying form components, such as HvLabel
and HvInfoMessage
.
See HvFormElement
for more information.