Switch

Switch is a control that is used to quickly switch between two possible states. Switches are only used for these binary actions that occur immediately after the user “flips” the switch. They are commonly used for “on/off” switches.

Default

Sizes

Dark & Light mode

Disabled

Buttons

Right to left

Props

NameTypeRequiredDefaultDescription
idstringNo-Unique element's identifier
checkedbooleanNofalseIs switch checked/unchecked
onChangeReact.ChangeEventNo-Event that happens when you click on the switch
captionUncheckedstringNo-Displayed text when unchecked
captionCheckedstringNo-Displayed text when checked
isRtlbooleanNofalse-