For React 18 and 19
Ask, then wait for the answer.
await confirm() opens a real dialog and resolves true or false. Style it with CSS, Tailwind or nothing at all.
npm i react-confirm-alertimport 'react-confirm-alert/style.css'const ok = await confirm({ title: 'Publish “Launch notes”?', message: 'Everyone in the workspace can read it.', confirmLabel: 'Publish',})Your own UI, the same await
Forms, lists and checks in plain HTML. Each one resolves what it closes with.