Switch

Switch component for toggling boolean value related to some context

PROPS

namedescriptiontypedefault
valueThe value of the switch. If true the switch will be turned on. Default value is falsebool
onValueChangeInvoked with the new value when the value changesfunc
disabledWhether the switch should be disabledbool
widthThe Switch widthnumber
heightThe Switch heightnumber
onColorThe Switch background color when it's turned onstring
offColorThe Switch background color when it's turned offstring
disabledColorThe Switch background color when it's disabledstring
thumbColorThe Switch's thumb colorstring
thumbSizeThe Switch's thumb size (width & height)number
thumbStyleThe Switch's thumb styleunion