<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Toggle/init(isOn:intent:label:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI6ToggleV012_AppIntents_aB0E4isOn6intent5labelACyxGSb_qd__xyXEtc0dE00D6IntentRd__lufc"
  },
  "title" : "init(isOn:intent:label:)"
}
-->

# init(isOn:intent:label:)

Creates a toggle performing an `AppIntent`.

```
nonisolated init<I>(isOn: Bool, intent: I, @ViewBuilder label: () -> Label) where I : AppIntent
```

## Parameters

`isOn`

Whether the toggle is on or off.

`intent`

The `AppIntent` to be performed.

`label`

A view that describes the purpose of the toggle.

---

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)