The Switch element is a toggle control used to turn an option on or off. It displays a label beside the toggle and supports customization of text color, style, size, and spacing. The Check field defines its default state when the page loads.

| Field Name | Type | Default Value | Description |
|---|---|---|---|
| Name | String | {name} | Unique identifier for the switch element. |
| Enable | Boolean | true | Determines if the switch is active or disabled. |
| Text | String | {text} | Label text displayed next to the switch. |
| Text.Color | Color | {textColor} | Color of the switch label text. |
| Text.Style | TextStyle | {textStyle} | Style of the switch label text (e.g., bold, italic). |
| Text.Size | Number | 16 | Font size of the label text. |
| Margin | Number | 20 | Outer spacing around the switch element. |
| MarginLine | Number | 10 | Vertical spacing relative to other elements. |
| Check | Boolean | false | Determines the default state of the switch (on/off). |
To learn how to build this same element using JSON coding, visit:
Develop the Switch with JSON