Back to Switch
Switch

Controlled

External state with conditional feedback.

Toggle to preview the setting — does not change site theme here.

API

PropTypeDefaultDescription
checked / defaultCheckedbooleanControlled / uncontrolled on state.
onCheckedChange(checked: boolean) => voidFires when the value changes.
labelReact.ReactNodeTop field label.
textReact.ReactNodeInline label text beside the switch.
helpTextReact.ReactNodeSupplementary help text.
controlPosition"start" | "end"endInline-start/end placement (RTL-aware).
disabledbooleanNative disabled state.
View full API on Switch

More Switch examples