# dialog/confirm Open a Yes/No confirmation dialog. ## Syntax
[dialog/confirm "Title" ?prompt]
## Parameters - `"Title"` — dialog title (defaults to `"Confirm"`) - `?prompt` — optional message body shown inside the dialog ## Examples
[dialog/confirm "Save changes?"]
[dialog/confirm "Delete" "This cannot be undone."]
[dialog/confirm %{ :title "Delete" :prompt "Are you sure?" }]
[dialog/confirm :save "Save changes?"]          # explicit id → :data~id :save
## Returns In TUI hosts the call returns immediately — `true` when an explicit id was given (leading keyword or `:id` in the spec map), else the numeric request-id. Behavior depends on the build: - TUI (`retro`, `retra`) — returns immediately; the result arrives later as a `:message` event with topic `"dialog-result"` and a structured `:data` map `%{ :id :value :cancelled }` where `:value` carries `"yes"` or `"no"`. - `deft` scripting binary — blocks on stdin, returns `"yes"` or `"no"`. ## See Also `dialog/msgbox`, `dialog/prompt`, `dialog/menu`