Reference Fields
Toggle
The Toggle field saves a binary value of either 'true' or 'false' in the database.

Strife Studio screenshot of a Toggle field
Settings
The Toggle field does not feature any distinctive settings beyond the standard ones.
Note:
You can find a comprehensive list of all basic settings in the 'Overview' section.
Define with JSON
When defining templates using JSON, this field is represented using:
- Component Name:
str-switch - Type:
toggle - Reference ID:
str-switch|toggle
The settings above map into the editor.attributes object inside the JSON definition.
{
...
"editor": {
"name": "str-switch",
"type": "toggle",
"propertyName": "...",
...
},
...
}Live preview
Note:
This field does not have any default Strife Web Components. Custom live preview implementations are fully supported.
Note:
For more information on live preview and Strife Web Components, please refer to the Live preview documentation.