---
title: "init(isOn:label:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/toggle/init(ison:label:)"
---

# init(isOn:label:)

Creates a toggle that displays a custom label.

## Declaration

```swift
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.

## See Also

### Creating a toggle

- [init(_:isOn:)](swiftui/toggle/init(_:ison:).md)
- [init(_:image:isOn:)](swiftui/toggle/init(_:image:ison:).md)
- [init(_:systemImage:isOn:)](swiftui/toggle/init(_:systemimage:ison:).md)
