Alert dialog

@summonware/ui · alert-dialog · P3 · Advanced UI

Usage

A confirm/destructive-action prompt built on the existing `Modal`, not a separate dialog implementation — the reference used SweetAlert2 for this, but the actual job ("block until the user confirms or cancels") is exactly what `Modal` plus two buttons already does.
import { AlertDialog } from '@summonware/ui';

Best practices

DoName the actual consequence in `description` ("removes every screen in it"), not a generic "are you sure?" — the specific stakes are what makes a confirm dialog worth the interruption.
Don'tUse this for a reversible action. A confirm dialog trains users to click through it without reading once it stops meaning something.

Examples

Common configurations, variations and states.

Destructive confirm

Delete this project?

This removes the project and every screen in it. There is no undo.

Click the button to open the dialog.

Reference variants

0 of 4 labels from the reference are demonstrated above.
Sweetalert 2MixinICONSInput types