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

# init(_:systemImage:role:intent:)

Creates a button with a specified role that generates its label from a string and a system image.

## Declaration

```swift
nonisolated init(_ title: some StringProtocol, systemImage: String, role: ButtonRole? = nil, intent: some AppIntent)
```

## Parameters

- `title`: A string that describes the purpose of the button’s intent.
- `systemImage`: The name of the image resource to lookup.
- `role`: An optional semantic role describing the button. A value of nil means that the button doesn’t have an assigned role.
- `intent`: The AppIntent to execute.

## Discussion

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

## See Also

### Creating a button to perform an App Intent

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