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-alert
Read the docs
downloads last month
236,794
downloads last month · npm
gzip for confirm()
4.0 kB
gzip for confirm() · size-limit
dependencies
0
dependencies · package.json
DraftEdited just now

Launch notes

app/layout.tsx
import 'react-confirm-alert/style.css'
publish.tsx
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.