Skip to main content

Toggle

A control that toggles between on and off states.

Example​

const isOn = useBinding(false);
<Toggle isOn={isOn} />

Props​

Toggle inherits all View Modifiers as props.

propdescriptiontyperequireddefault
isOnThe toggle valueBooleanBindingyesundefined
onChangeFunction to execute when the toggle value changes(v: boolean) => voidnoundefined