Switch

Switch description.


Props

Switch properties

PropertyDescriptionTypeDefaultVersion
idUnique ID for each Switch this is important for the handleToggle to identify each switch differentlystring
isOnShould the switch be on by defaultbooleanfalse
handleToggleFunction to control the Switch stateFunction() => void
onColorWhat color should the switch be in the when it is toggled on?stringfalse
sizeWhat size should the Switch be?small, largesmall
cssAddition CSS styling optionsReact.CSSProperties

Usage

Base