Back

ConfirmAction

Danger (default)

Click the button below — it reveals a confirm/cancel prompt inline.

Primary

Usage

Wrap any trigger element. Listen for the custom confirm-action event dispatched on confirm.

@feedback.ConfirmAction(feedback.ConfirmActionProps{
    ConfirmLabel: "Delete",    // default: "Confirm"
    CancelLabel:  "Cancel",    // default: "Cancel"
    Variant:      "danger",    // "danger" | "primary"
}) {
    <button>Delete item</button>
}

// Listen for confirmation:
// <div x-on:confirm-action="handleDelete()">