Popconfirm
Request a brief confirmation near the action element.
Usage guide
#Use for actions requiring a brief confirmation, such as deletion or reset. Use Modal for longer explanations or input.
Place inside the action button
Put the question in the default slot and make outcomes clear with
confirmTextandcancelText.Distinguish confirmation results
Check for
okorcancelinselected.detail.Act only after confirmation
Perform the actual action only after receiving
ok. Do not run it on the button's initial click.
Examples
#Feature examples
#Choose a feature from 16 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.
No matching features.
API reference
#Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.
<sy-popconfirm>
Properties
| Attribute / Property | Type | Default | Description |
|---|---|---|---|
boolean | false | Show an arrow pointing to the trigger. | |
boolean | false | Show the close button. | |
'top' | 'bottom' | 'left' | 'right' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom' | 'top' | Popup placement relative to the trigger. | |
'click' | 'none' | 'click' | User action that opens the list or popup. | |
number | 0 | Opening delay in milliseconds. | |
number | 0 | Closing delay in milliseconds. | |
string | 'OK' | Confirmation button text. | |
string | 'Cancel' | Cancel button text. | |
boolean | false | Stick to the top of the nearest scroll container. | |
| 'none'
| 'fade' | 'fade-scale' | 'zoom' | 'pop'
| 'slide-top' | 'slide-bottom' | 'slide-left' | 'slide-right'
| 'slide-fade-top' | 'slide-fade-bottom' | 'slide-fade-left' | 'slide-fade-right'
| 'reveal-top' | 'reveal-bottom' | 'reveal-left' | 'reveal-right'
| 'flip-x' | 'flip-y' | 'bounce' | 'spin' | 'none' | Enter/exit animation type. `none` (default) toggles instantly. | |
'x-fast' | 'fast' | 'medium' | 'slow' | 'x-slow' | 'fast' | Animation playback speed token. Maps to `--transition-*` global tokens. |
Events
| Event | Detail | Description |
|---|---|---|
CustomEvent<boolean> | Read the result from the event's detail. | |
CustomEvent<'ok' | 'cancel'> | Emitted when the user selects an item. |
Methods
| Method | Returns | Description |
|---|---|---|
Promise<void> | Expand the submenu. | |
Promise<void> | Close the item. |
Slots
| Slot | Description |
|---|---|
| Component body or child items. |