Component
Toggle
On/off switch. Renders standalone, or as a labeled row when given a label.
Notifications
Dark mode
jsx
<Toggle defaultChecked />
<Toggle label="Notifications" defaultChecked />
<Toggle label="Dark mode" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label
|
string | — | Optional label; when present the switch is laid out as a row. |
defaultChecked
|
boolean | false | Initial on/off state. |