<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WidgetKit",
  "identifier" : "/documentation/WidgetKit/ControlWidgetToggle",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "WidgetKit"
    ],
    "preciseIdentifier" : "s:9WidgetKit07ControlA6ToggleV"
  },
  "title" : "ControlWidgetToggle"
}
-->

# ControlWidgetToggle

A control template representing a toggle.

```
@MainActor @preconcurrency struct ControlWidgetToggle<Label, ValueLabel, Action> where Label : View, ValueLabel : View
```

## Overview

Toggles are controls that have two states, “off” and “on”.

## Topics

### Initializers

[`init(isOn:action:label:)`](/documentation/WidgetKit/ControlWidgetToggle/init(isOn:action:label:))

Creates a toggle template for a control.

[`init(isOn:action:label:valueLabel:)`](/documentation/WidgetKit/ControlWidgetToggle/init(isOn:action:label:valueLabel:))

Creates a toggle template for a control.

[`init(_:isOn:action:valueLabel:)`](/documentation/WidgetKit/ControlWidgetToggle/init(_:isOn:action:valueLabel:)-33wfq)

Creates a toggle template for a control.

[`init(_:isOn:action:valueLabel:)`](/documentation/WidgetKit/ControlWidgetToggle/init(_:isOn:action:valueLabel:)-5o6bn)

Creates a toggle template for a control.

[`init(_:isOn:action:valueLabel:)`](/documentation/WidgetKit/ControlWidgetToggle/init(_:isOn:action:valueLabel:)-4lk32)

Creates a toggle template for a control.

### Default action label

[`ControlWidgetToggleDefaultLabel`](/documentation/WidgetKit/ControlWidgetToggleDefaultLabel)

A view that represents the default label for a toggle control if you don’t provide
a label.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)