--- layout: docs title: Switch edit_url: "https://github.com/nylas/N1/blob/master/src/components/switch.cjsx" ---
A small React component which renders as a horizontal on/off switch.
Provide it with onChange
and checked
props just like a checkbox:
<Switch onChange={@_onToggleChecked} checked={@state.form.isChecked} />