Popconfirm
Confirmation popover anchored to a slotted trigger element, showing a message with Confirm and Cancel buttons built on the native Popover API.
Preview
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
title | string | — | Question text shown in the popover (alias of message). |
message | string | — | Question text shown in the popover (alias of title). |
confirm-text | string | — | Label for the confirm button. |
cancel-text | string | — | Label for the cancel button. |
danger | boolean | — | Renders the confirm button with a danger style. |
placement | string | bottom | Popover placement relative to the trigger: bottom | top | left | right. |
Installation
pura is copy-paste and dependency-free. Load the whole library, or just this component.
<link rel="stylesheet" href="/pura/tokens.css">
<script type="module" src="/pura/lib/popconfirm.js"></script> import "./pura/lib/popconfirm.js";