Toggle Control
On/off switch control for boolean values.
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
label | string | - | Field label |
control | string | toggle | Control type |
default | boolean | false | Default value |
Example
Section titled “Example”{ "attributes": { "showTitle": { "type": "boolean", "default": true, "wbs": { "label": "Show Title", "control": "toggle" } } }}Template Usage
Section titled “Template Usage”{% if attributes.showTitle %} <h2 class="block-title">{{ attributes.title }}</h2>{% endif %}Use Case
Section titled “Use Case”Use Toggle for:
- Enabling/disabling features
- Showing/hiding sections
- Any binary on/off settings