> ## Content Index
> Fetch the complete content index at: https://getpublii.com/dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# Switcher

- URL: https://getpublii.com/dev/switcher/
- Published: 2019-03-23T13:58:51.821Z
- Updated: 2025-01-19T09:35:56.804Z
- Description: dependencies
- Author: Tomasz Dziuda
- Tags: Fields, Theme Settings API

For situations where you want to allow users just to enable or disable some options, you can consider the switcher field, which allows only two values - **true** or **false**:

```json
{
    "name": "lazyLoad",
    "label": "Lazyload",
    "group": "Additional",
    "note": "Enables lazyloading images that are currently not viewed, thus saving bandwidth.",
    "value": true,
    "type": "checkbox"
}
```

![Switcher HTML ](https://getpublii.com/dev/media/posts/117/switcher-2.svg)

The switcher fields are great for handling the conditional displays of other options with the use of the **dependencies** parameter described under [Theme Settings API](#INTERNAL_LINK#/post/108).
