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

# init(_:systemImage:isOn:)

Creates a toggle that generates its label from a localized string key and system image.

## Declaration

```swift
nonisolated init(_ titleKey: LocalizedStringKey, systemImage: String, isOn: Binding<Bool>)
```

## Parameters

- `titleKey`: The key for the toggle’s localized title, that describes the purpose of the toggle.
- `systemImage`: The name of the image resource to lookup.
- `isOn`: A binding to a property that indicates whether the toggle is on or off.

## Discussion

Discussion This initializer creates a Text view on your behalf, and treats the localized key similar to init(_:tableName:bundle:comment:). See Text for more information about localizing strings.

## See Also

### Creating a toggle

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