---
title: "init(_:systemImage:action:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/button/init(_:systemimage:action:)"
---

# init(_:systemImage:action:)

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

## Declaration

```swift
nonisolated init(_ titleKey: LocalizedStringKey, systemImage: String, action: @escaping @MainActor () -> Void)
```

## Parameters

- `titleKey`: The key for the button’s localized title, that describes the purpose of the button’s action.
- `systemImage`: The name of the image resource to lookup.
- `action`: The action to perform when the user triggers the button.

## Mentioned in

Populating SwiftUI menus with adaptive controls

## Discussion

Discussion This initializer creates a Label 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 button

- [init(action:label:)](swiftui/button/init(action:label:).md)
- [init(_:action:)](swiftui/button/init(_:action:).md)
- [init(_:image:action:)](swiftui/button/init(_:image:action:).md)
