Hextech UI

Alert Dialog

Live example

Alert Dialog

Installation

Terminal
npx shadcn@latest add https://hextech-ui.vercel.app/r/alert-dialog.json

API reference

These are the main Alert Dialog options. See the exported TypeScript types for inherited native or primitive props.

PropTypeDefault
open / defaultOpenbooleanfalse
onOpenChange(open, details) => void—

Confirmation

Use for a decision that needs an explicit response. Provide a title, consequence and clearly labeled cancel/confirm actions. Use open with onOpenChange to own visibility. Keep focus restoration intact after either choice.