Basic Usage

A single toggle with reactive state display.

ONOFF

Settings Panel

Multiple toggles for application preferences.

ONOFF
ONOFF
ONOFF

Privacy Controls

Security and privacy toggles for user accounts.

EnabledDisabled
VisibleHidden

Notification Preferences

Fine-grained notification control.

Feature Flags

Enable or disable experimental features.

In a Form

Switch toggles combined with form inputs.

Usage

darkMode = false// Basic switch<Switch bind={darkMode} label="Dark mode" />// With status badge<Row> <Switch bind={darkMode} label="Dark mode" /> {if darkMode}<Badge type="gold">ON</Badge>{else}<Badge>OFF</Badge>{/if}</Row>

Props

PropTypeDefaultDescription
bindbinding-Two-way boolean binding
labeltext""Label text next to switch