Calm motion: animations on this site only fade, with no movement
ConfirmPopup
Confirm inside a popover
A quick "are you sure?" next to the button that asked, for a small step that cannot be taken back: delete a draft, revoke a share link. If you can take the step back, do not ask. Do it and offer Undo from a Toaster. For something serious, where the whole page must stop, use an AlertDialog.
Basic
Delete this episode? This cannot be undone.
Publish
Make it visible to everyone?
Not inside <p>
The floating panel is a <div>. HTML closes a <p> at a <div>. For this reason, a trigger placed inside a paragraph renders differently on the server and the client. Wrap it in a <span> or <div> instead.
- Opening moves focus to Cancel, the safe choice. Confirming or canceling returns it to the trigger.
@confirm/@cancel. Name the action inlabels.confirm("Remove", not "OK").
Usage
ts
import { BlessConfirmPopup } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
message* | string | — | |
title | string | — | |
color | "text" | "accent" | "danger" | "text" | |
placement | Placement | "bottom" | |
labels | Partial<{ confirm: string; cancel: string; }> | — | |
open | boolean | false |
Events
| Name | Payload | Description |
|---|---|---|
update:open | [value: boolean] | |
cancel | [] | |
confirm | [] |
Slots
| Name | Scope | Description |
|---|---|---|
trigger | { open: boolean; } |