Shows a question dialog with Yes and No buttons.
Yes
No
The message to show.
Optional
The dialog's options. If a string, it represents the dialog title.
A promise resolving to a boolean indicating whether Yes was clicked or not.
import { ask } from '@tauri-apps/plugin-dialog';const yes = await ask('Are you sure?', 'Tauri');const yes2 = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', kind: 'warning' }); Copy
import { ask } from '@tauri-apps/plugin-dialog';const yes = await ask('Are you sure?', 'Tauri');const yes2 = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', kind: 'warning' });
2.0.0
Shows a question dialog with
Yes
andNo
buttons.