> For the complete documentation index, see [llms.txt](https://docs.acho.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acho.io/app-builder/app-construction/elements/form-elements/switch.md).

# Switch

A switch element toggles on and off.

<figure><img src="/files/DOyv90RLrdTDgjrKQXh2" alt=""><figcaption></figcaption></figure>

## Properties

![](/files/HWSB417zy0amkwcmLzN5)

**Form item name:** This is the name that the encompassing form will use to access the output of the checkbox. See [Custom Form](/app-builder/app-construction/elements/form-elements/custom-form.md) for how it's used.

**Mode:** Change between a switch or checkbox display of the element.

**Default value:** Set whether the switch will by default be on or off.

**Active and Inactive text:** Text displayed next to the switch when it is on or off.

**Active and Inactive color:** Color of the active or inactive text.

**Size:** Select a size for the element.

**Disabled:** When toggled on, the user will not be able to change the switch.

See [Form Check](/app-builder/app-construction/elements/form-check.md) for data validation.

See [Tooltip](/app-builder/app-construction/elements/tooltip.md) for tooltip configurations.

## Output

The output of a switch is true/false (boolean).

## Supported Events

**Switch Value:** Triggered when a user switches the value.

## Supported Actions

**Set Value:** Set the value of the element (true/false)

**Set Validate Result:** Set whether the input is valid.

**Set Data:** Change element data. See [Data Store](/app-builder/app-construction/data-store.md).

**Set Loading:** Set loading animation. See [Set loading animations](/app-builder/popular-use-cases/set-loading-animations.md).

{% hint style="info" %}
Visit [Interactions](/app-builder/app-construction/interactions.md) for more on events and actions.
{% endhint %}
