Switch
The Switch lets visitors make an on/off choice with a visual switch instead of a checkbox. Use it to activate an extra option, collect marketing consent, or turn a configuration setting on or off.
Properties
The properties live in the inspector under the Switch group.
Property | What it does | Default |
|---|---|---|
Selected | Whether the switch starts on | False |
Disabled | Prevents visitors from changing the switch | False |
Label | Text shown next to the switch | Label |
Caption | Supporting text shown under the label | Empty |
Required | Requires the visitor to answer before moving on | False |
Go to next view when answered | Advances to the next view once the visitor answers | Off |
Logic | Conditions that control when the switch shows | None |
Selected and Disabled accept a boolean or a formula. The Label field shows the placeholder "Add label" and the Caption field shows "Add caption" when empty.
References
References expose the visitor's answer as data you can use in formulas and other elements. Assign a reference to store the switch's state in a variable.
Value: whether the switch is on.
Touched: whether the visitor has changed the switch.
Last touched at: when the visitor last changed the switch.
The Switch has no Label, Count, or Matrix reference.
Styling
The Switch can be styled per state and per part of the element.
Style states: Active, Checked, Default, Disabled, Error, Focus, Hover.
Named targets: wrapper, switch, thumb, content, label, caption, error-label.
Named style: Switch, which is the default style.
The Switch has no quick styles. Apply general styling from the Style tab: style sets and CSS overrides per state and per breakpoint. See the styling reference for the full system.
Related articles
UI Elements: overview of the elements.
FormulaScript Overview: using formulas in properties.