Switch

Props

NamePropTypeRequiredDefault ValueAllowed ValuesDescription
aria-labelstringfalseUsed to describe the purpose of the switch. To be used if there is no external label (i.e. aria-labelledby is null)
aria-labelledbystringfalseA reference to a label that describes the purpose of the switch. Ignored if aria-label is provided
checkedbooleanfalseWhether the switch is checked or not
disabledbooleanfalse
idstringfalseID to apply to the switch container
onClicksignaturetrueFunction called when the switch is toggled
Edit these docs on Github