Skip to Content

Switch

A switch allows a user to turn a setting on or off.

Disabled

Component props

NameTypeDescription
labelstringLabel text displayed above the switch
isSelectedbooleanControlled selected state
defaultSelectedbooleanDefault selected state
isDisabledbooleanDisables the switch
onChange(isSelected: boolean) => voidCalled when state changes