Skip to main content
Sentivel Endorsed by RayfieldStatus pages and uptime monitoring for whatever you ship. Free to start.Take a look A toggle flips a boolean. CreateSwitch is an alias for the same element.
Toggle elements, one on and one off

Properties

string
The label.
string
Hint text under the label. Optional.
string | number
An icon shown beside the label. Optional.
boolean
default:"false"
The initial state.
string
default:"derived from name"
The save key. Optional.
boolean
default:"false"
Skip saving.
function
Runs with the new value on every change.

Handle

boolean
The current state.
Set the state. Pass true as the second argument to skip the callback.