Toggle
An on/off switch for a setting that takes effect immediately.
Consumer provides: the state and the label of the row it sits in (the row is the target).
Rules
- Track 52 × 28 dp. On:
foresttrack, white knob carrying aforestcheck. Off: white track with a 1 dpoutline, outlined knob, no check. The check is what tells on from off in grayscale. - Always in a SettingsRow; the whole row toggles it.
- Use only for immediate effects. A choice confirmed with Save uses a Checkbox.
- In the » tray, Lock zoom is an IconButton with the selected-tool state, not a Toggle.
Compose
M3 Switch with thumbContent = { if (checked) Icon(check) }, colours from the tokens, no elevation.
In the app
InkToggle implements these rules.
Preview
On · off