Skip to content
Tauri

ask

ask(message, options?): Promise<boolean>

Defined in: index.ts:251

Shows a question dialog with Yes and No 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 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' });

2.0.0


© 2025 Tauri Contributors. CC-BY / MIT