<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Button/init(_:systemImage:role:intent:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI6ButtonV012_AppIntents_aB0AA5LabelVyAA4TextVAA5ImageVGRszrlE_06systemH04role6intentACyAKGqd___SSAA0C4RoleVSgqd_0_tcSyRd__0dE00D6IntentRd_0_r0_lufc::OverloadGroup"
  },
  "title" : "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.

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

This initializer creates a [`Label`](/documentation/SwiftUI/Label) view on your behalf, and treats the
title similar to [`init(_:)`](/documentation/SwiftUI/Text/init(_:)-9d1g4). See [`Text`](/documentation/SwiftUI/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)