Calm motion: animations on this site only fade, with no movement
AlertDialog
Confirm dialog
A question that must be answered before going on, usually before something that cannot be undone: delete, discard, leave. For information that needs no answer, use a Toast or an Alert. For a quick confirm next to the button, ConfirmPopup. If the action can be reversed, do not ask: do it and offer Undo in a toast.
Basic
- It is read as an alert dialog with its title and
description. Focus starts on Cancel, the safe choice. Esc also cancels. - Clicking outside does not close it.
@confirmand@cancelsay which way it went.loadingholds the confirm button while you work. - Name the action in the button (
:labels="{ confirm: 'Delete' }"), not "OK".
Usage
ts
import { BlessAlertDialog } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
title* | string | — | |
description | string | — | |
color | "text" | "accent" | "danger" | "danger" | confirm button color |
loading | boolean | — | |
labels | Partial<{ confirm: string; cancel: string; }> | — | |
modelValue | boolean | false |
Events
| Name | Payload | Description |
|---|---|---|
cancel | [] | |
update:modelValue | [value: boolean] | |
confirm | [] |
Slots
| Name | Scope | Description |
|---|---|---|
default | — |