lace:confirm

Gate any action behind a confirmation dialog. Add lace:confirm to the same element as an action (lace:click, lace:submit, ...); the browser shows a confirm dialog and the action only runs if the user accepts. Cancelling aborts it.

<button lace:click="delete(1)" lace:confirm="Delete this item?">Delete</button>

If you omit the message, a default ("Are you sure?") is used:

<button lace:click="reset" lace:confirm>Reset</button>

The action's default is still prevented when applicable, so a cancelled lace:submit will not reload the page.

View this page as markdown - handy as context for your AI tools. Full index at /llms.txt.

Theme
Accent
Ink