Alert Dialog
A modal dialog that interrupts the user with important content and expects a response.
bunx shadcn@latest add @nx-ui/alert-dialogBasic
A destructive confirmation. AlertDialogCancel and AlertDialogAction sit in the footer; the cancel closes the dialog and the action performs it.
With media
An AlertDialogMedia icon slot precedes the title on wider screens, and stacks above it on small viewports.
Sizes
The default size widens to max-w-lg on sm+ screens; sm stays compact for short, single-action confirmations.
Pending action
Drive the open state yourself to keep the dialog open while an action is in flight, then close it once the work resolves.
Composition: unsaved changes
A realistic guard dialog shown when navigating away from an in-progress batch record with unsaved edits.
API reference
Exported parts and their props, extracted from the component source.