AlertDialog asks the user to confirm a destructive or irreversible action before it happens. Use it for things like deleting content, revoking access, or discarding unsaved changes.
For cases where you want to show an alert without managing open state, use the useImperativeAlertDialog hook: call alert.show(options) and render alert.element in your tree.
tsimport {AlertDialog} from '@astryxdesign/core/AlertDialog'
| Guidance | Practices |
|---|---|
| Do | Make the action button label specific: "Delete project" is better than "OK" or "Confirm". |
| Do | Describe what will happen in the description so the user knows the consequences before confirming. |
| Don't | Use AlertDialog for non-destructive actions; use a standard Dialog instead. |