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

This is the snapshot of v0.2.10, the current version, as recorded on 2026-11-10. The live page runs its examples →

Examples of v0.2.10 are shown as code; only the latest version runs live. Open the live examples →

Basic Confirm Dialog
1const BasicConfirmDialog = () => {
2 const [open, setOpen] = useState(false);
3
4 return (
5 <>
6 <button type="button" onClick={() => setOpen(true)}>
7 Delete page
8 </button>
9 <ConfirmDialog
10 open={open}
11 onOpenChange={setOpen}
12 title="Delete page"
13 message='Are you sure you want to delete "About Us"? This cannot be undone.'
14 confirmLabel="Delete"
15 variant="danger"
16 onConfirm={() => console.log("confirmed delete")}
17 />
18 </>
19 );
20};
21
22render(<BasicConfirmDialog />);