Alert Dialog

A modal that interrupts the user to confirm an action. It has no close icon.

components/ui/alert-dialog.tsx

Installation

npx betterone-ds add alert-dialog

Props

ComponentPropTypeDefault
AlertDialogsize"default" | "sm""default"

Accessibility

  • Uses role="alertdialog". Focus moves into the dialog and returns to the trigger on close.
  • Use for destructive or irreversible actions only. Use Dialog for everything else.