<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/confirmationDialog(_:item:titleVisibility:actions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE18confirmationDialog_4item15titleVisibility7actionsQrAA4TextV_AA7BindingVyqd_0_SgGAA0H0Oqd__qd_0_XEtAaBRd__r0_lF::OverloadGroup"
  },
  "title" : "confirmationDialog(_:item:titleVisibility:actions:)"
}
-->

# confirmationDialog(_:item:titleVisibility:actions:)

Presents a confirmation dialog using data to produce the dialog’s
content and a text view for the title.

```
@export(implementation) nonisolated func confirmationDialog<A, T>(_ title: Text, item data: Binding<T?>, titleVisibility: Visibility = .automatic, @ContentBuilder actions: (T) -> A) -> some View where A : View
```

## Parameters

`title`

the title of the dialog.

`data`

A binding to optional source of truth for the confirmation
dialog. The system presents the dialog when the binding’s value is
non-nil. When the user presses or taps the dialog’s default action
button, the system sets this value to `nil` and dismisses. The
system passes the contents to the modifier’s closures. You use this
data to populate the fields of a confirmation dialog that you create
that the system displays to the user.

`titleVisibility`

The visibility of the dialog’s title. The default
value is [`Visibility.automatic`](/documentation/SwiftUI/Visibility/automatic).

`actions`

A [`ContentBuilder`](/documentation/SwiftUI/ContentBuilder) returning the dialog’s actions given the
currently available data.

---

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)