<!-- Generated by npm run gen:skill from ui/Toggle/skill.md - do not edit. -->

# Toggle

## `<toggle>`

- `default`: false | off | 0
- `post-text`, `pre-text`, `checked`
- actions: release, select
- events: Release, Select

```xml
<application name="ToggleSwitches" instances="0">
  <about loader="false"/>
  <view name="tg1" width="220" height="110">
    <panel type="rows" gap="10" padding="8">
      <toggle name="tgWifi" post-text="Wi-Fi" checked="true"/>
      <toggle name="tgBluetooth" post-text="Bluetooth"/>
      <toggle name="tgFlight" post-text="Flight mode" enabled="false"/>
    </panel>
  </view>
</application>
```

## Guidance

- For a setting that applies at once (Wi-Fi on); a choice confirmed later is a `checkbox`.
- Its text is `post-text` or `pre-text` (a click on it switches); it is also the switch's screen-reader name.
- Values: false/true, or off/on with `default="off"`, 0/1 with `default="0"`; `checked="true"` starts it on. Bound, it writes in that pair.
- A click or Space fires Select (on) or Release (off); a set fires them only when it changes the state. The select and release actions switch it without them.
