Skip to content

zk-confirm-dialog ​

A confirmation (or a notice) in a native dialog, with its buttons.

Also available as x-zk-dialog, the name that @zairakai/vue-components gives it.

Props ​

PropTypeDefaultDescription
idstringrequiredIdentifier, to open it
titlestring|nullnullTitle
messagestring|nullnullText, when there is no slot
confirmLabelstring'OK'Text of the confirm button (value="confirm")
cancelLabelstring'Cancel'Text of the cancel button (value="cancel")
alertboolfalseA notice: no cancel button, and Escape does not close it
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Slots ​

SlotDescription
defaultReplaces the message

The buttons are in a <form method="dialog">: the dialog closes by itself and its returnValue is confirm or cancel; listen to the close event of the dialog to act. Needs the script modal of zk-scripts: the component asks for it by itself. Class hooks: dialog, dialog-title, dialog-message, dialog-actions, dialog-cancel, dialog-confirm.

Examples ​

Delete ​

blade
<button commandfor="del" command="show-modal">Delete</button>

<x-zk-confirm-dialog id="del" title="Delete the project?" message="This cannot be undone." confirm-label="Delete" />

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.