AlertDialog

Storybook

A forced-choice modal dialog that requires an explicit user action. Unlike Dialog, backdrop clicks are ignored and the close button is hidden by default. Built with native <dialog> + showModal() and role="alertdialog".

Basic (Client-only)

Opens and closes entirely in JavaScript. Backdrop click does nothing. Only the Cancel or Continue buttons dismiss the dialog.

Are you absolutely sure?

This action cannot be undone. This will permanently delete your account and remove your data from our servers.

Destructive

Delete confirmation with a variant="destructive" action button. The destructive styling makes the consequences clear.

Delete account?

This will permanently delete your account and all associated data. This action cannot be reversed.

Server-controlled

Server opens and closes the dialog. Demonstrates on_cancel={JS.push(...)} for server notification on dismiss. The result displays which button was pressed.

Server state: show=false, result=nil