boolean
A toggle switch for true/false values. Use it for show/hide toggles, feature flags, or any on/off setting.
Common pattern
Combine boolean with an {% if %} block in your template to conditionally show or hide sections.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
type | "boolean" | Yes | Field type identifier |
label | string | Yes | Label shown in the builder |
default | boolean | No | Default value (false if omitted) |
Usage
- schema.json
- Template
- Output
{
"show_section": {
"type": "boolean",
"label": "Show section",
"default": true
}
}
{% if widget.settings.show_section %}
<div>Visible content here</div>
{% endif %}
{
"show_section": true
}
Interactive Preview
Interactive Preview
On
Live Output
{
"show_section": true
}