<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Toggle/init(isOn:label:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI6ToggleV4isOn5labelACyxGAA7BindingVySbG_xyXEtcfc"
  },
  "title" : "init(isOn:label:)"
}
-->

# init(isOn:label:)

Creates a toggle that displays a custom label.

```
nonisolated init(isOn: Binding<Bool>, @ContentBuilder label: () -> Label)
```

## Parameters

`isOn`

A binding to a property that determines whether the toggle is on
or off.

`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)