marigold-ui/marigold_2026
ConfirmationDialog
main
–
Build 269
Basic
Opens with the title, content and action buttons
Calls onConfirm and closes when the action button is pressed
Calls onCancel and closes when the cancel button is pressed
Closes with Escape without opting in to keyboard dismiss
Focuses the action button on open when autoFocusButton is "action"
Focuses the cancel button on open when autoFocusButton is "cancel"
Focuses the cancel button on open when the variant is destructive
useConfirmation builds the dialog from the config passed to confirm()
Dismissing with Escape resolves the confirmation as cancelled
Pressing cancel resolves the confirmation as cancelled
Confirming resolves as confirmed even though closing also settles the promise
useConfirmation forwards autoFocusButton from the confirm() config
Chromatic publishes Storybook to streamline collaboration
Learn more
Sign in
Canvas