# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acho.io/app-builder/app-construction/elements/form-elements/switch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
