> For the complete documentation index, see [llms.txt](https://hawklib.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hawklib.gitbook.io/docs/elements/window/tabs/toggles.md).

# Toggles

## Toggle Creation

Example Toggle

```luau
local MyToggle = Tab1:Toggle("ESP Active", "Enable/disable ESP", false, function(value)
    print("Toggle state:", value)
    if value then
        print("ESP Enabled")
    else
        print("ESP Disabled")
    end
end)
```

first arg is title

second arg is description

third arg is first state of toggle

### Updating Toggles

```luau
MyToggle:UpdateToggle(true) --enables the toggle
```
