A `Modal` pre-wired with a message and confirm/cancel actions, for "are you sure?" moments such as confirming a delete.

pnpm add @behivetech/molecules.confirm-dialog

You are viewing Confirm Dialog v0.2.8, snapshotted 2026-11-09. The latest is v0.2.10. Go to the latest →

A Modal pre-wired with a message and confirm/cancel actions, for "are you sure?" moments such as confirming a delete.

Usage

1import { ConfirmDialog } from "@behivetech/molecules.confirm-dialog";
2
3<ConfirmDialog>Content</ConfirmDialog>;

Properties

ConfirmDialog props

PropTypeDefaultDescription
message*ReactNode—Confirmation message/body content
onConfirm*() => void—Called when the confirm button is clicked, before the dialog closes
onOpenChange*(open: boolean) => void—Called when the dialog should close (cancel, confirm, backdrop click, Escape)
open*boolean—Whether the dialog is open
title*string—Dialog title
cancelLabelstringCancelCancel button label; defaults to "Cancel"
confirmLabelstringConfirmConfirm button label; defaults to "Confirm"
variant"default" | "danger"defaultRenders the confirm button as a destructive action; defaults to "default"