<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Toggle/init(_:systemImage:isOn:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI6ToggleVA2A5LabelVyAA4TextVAA5ImageVGRszrlE_06systemF04isOnACyAJGAA18LocalizedStringKeyV_SSAA7BindingVySbGtcfc::OverloadGroup"
  },
  "title" : "init(_:systemImage:isOn:)"
}
-->

# init(_:systemImage:isOn:)

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

```
@export(implementation) 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

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

---

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)