> For the complete documentation index, see [llms.txt](https://docs.zingy.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/toggle-switch.md).

# Toggle Switch

<div align="left"><figure><img src="/files/7wHOPKzOHpQ15mZGf7ld" alt="" width="68"><figcaption><p>Toggle Switch Element</p></figcaption></figure></div>

The **`Toggle Switch`** element is a composite element consisting of an [Input](/app-editor/page-editor/built-in-elements/input.md) element and a [Label](/app-editor/page-editor/built-in-elements/label.md) element. It is similar to the  [Checkbox](/app-editor/page-editor/built-in-elements/checkbox.md) element, but renders the element as a switch that can be turned on or off.

The included [Label](/app-editor/page-editor/built-in-elements/label.md) element is preconfigured with its [Associated Input ID](/app-editor/page-editor/built-in-elements/label.md#associated-input-id) set to the [Element ID](/app-editor/page-editor/page-element-settings.md#advanced-tab) of the included [Input](/app-editor/page-editor/built-in-elements/input.md) element.

For customization options please see the [Checkbox](/app-editor/page-editor/built-in-elements/checkbox.md) element.

{% hint style="warning" %}
[Checkbox](/app-editor/page-editor/built-in-elements/checkbox.md) and [Toggle Switch](/app-editor/page-editor/built-in-elements/toggle-switch.md) elements, used inside a Data Design element, need to be initialized using the [Initialize Toggle Switch in Data Design](/app-editor/page-flow/toolbox-blocks/initialize-toggle-switch-in-data-design.md) block, after they are added to the page or form.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.zingy.ai/app-editor/page-editor/built-in-elements/toggle-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.
