MindeesUI
ComponentsOverlays

Confirmation Dialog

A focused yes-or-no dialog with confirm and cancel actions and an optional destructive treatment for risky operations.

ConfirmationDialog is a thin preset over Dialog for binary decisions. It renders a title, optional message, a ghost cancel button, and a solid confirm button. Set destructive to color the confirm action with the danger tone for irreversible actions.

Import

import { ConfirmationDialog } from '@mindees/ui';

Usage

const [visible, setVisible] = useState(false);

return (
  <ConfirmationDialog
    visible={visible}
    onClose={() => setVisible(false)}
    title="Delete file?"
    message="This action cannot be undone."
    confirmLabel="Delete"
    destructive
    onConfirm={deleteFile}
  />
);

Props

PropTypeDefaultDescription
visiblebooleanControls whether the dialog is shown.
onClose() => voidCalled when the dialog requests close (backdrop/back).
titlestringRequired heading describing the decision.
messagestringOptional secondary-toned body line.
confirmLabelstring'Confirm'Label for the confirm button.
cancelLabelstring'Cancel'Label for the cancel button.
onConfirm() => voidCalled when the confirm button is pressed, then closes.
onCancel() => voidCalled when canceling, before onClose.
destructivebooleanfalseStyles the confirm button with the danger tone.
styleStyleProp<ViewStyle>Style for the elevated panel (not the scrim).

Accessibility

Inherits Dialog's modal behavior — the title doubles as the dialog's accessibility label so screen readers announce the question on open. Both actions are real Button controls with accessibilityRole="button". Confirming or canceling both call onClose, so the dialog is always dismissible by keyboard or back gesture.

On this page