Skip to content
View Markdown

Toggle ​

A control for a Boolean setting.

tsx
import { Toggle } from '@satinhq/kit'

Example ​

Click Download over Wi-Fi to turn it off and on.

Bind the value ​

Pass a Boolean to isOn and a setter to onChange.

Place it in a row ​

Inside a List or Form, Toggle renders its label and switch as one row. Keep the label descriptive.

API ​

Scroll horizontally to read every column.

PropTypeDescription
labelstringThe setting name.
isOnbooleanThe current value.
onChange(isOn: boolean) => voidReceives the new value.
disabledbooleanPrevents changes.

Related: Quick start, List, Screen.

:::

Satin runs on the Lumen rendering engine and is open source under the MIT License.