confirm
confirm(
message
,options?
):Promise
<boolean
>
Defined in: index.ts:281
Shows a question dialog with Ok
and Cancel
buttons.
string
The message to show.
The dialog’s options. If a string, it represents the dialog title.
string
| ConfirmDialogOptions
Promise
<boolean
>
A promise resolving to a boolean indicating whether Ok
was clicked or not.
import { confirm } from '@tauri-apps/plugin-dialog';const confirmed = await confirm('Are you sure?', 'Tauri');const confirmed2 = await confirm('This action cannot be reverted. Are you sure?', { title: 'Tauri', kind: 'warning' });
2.0.0
© 2025 Tauri Contributors. CC-BY / MIT