---
title: confirm
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/buttonrole/confirm
---

# confirm

A role that indicates a button that confirms an operation.

## Declaration

```swift
static let confirm: ButtonRole
```

## Discussion

Discussion The following view would display a confirm button in the toolbar. struct NewContactSheet: View {     var body: some View {         NavigationStack {             NewContactEditor()                 .toolbar {                     Button(role: .confirm) {                         saveChanges()                     }                 }         }     } }
