Alert Dialog

Confirm/cancel dialog for destructive or important actions. Matches shadcn-svelte Alert Dialog.

Alert Dialog

Modal with role="alertdialog" for confirm/cancel flows. Use slot="actions" for buttons. Open/close via openAlertDialog_* / closeAlertDialog_* on window.

Add this component

The command below includes <strong>AlertDialog</strong>—run it in your project directory to install this component (and the CSS if needed). No prompts.

Choose your package manager — click a tab to select, then copy the command.

npm pnpm yarn bun

Example

Live Example

Usage

Usage

Full example for each framework (Astro, Vanilla, Svelte, Vue, React). Switch framework via View as or by clicking a Usage tab—both stay in sync.

Astro Vanilla Svelte Vue React

Other frameworks: Vanilla · Svelte · Vue · React