Alert Dialog @astryx-svelte/core v0.3.0 · AlertDialog
Usage
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 theuseImperativeAlertDialog hook: call alert.show(options) and render alert.element in your tree. tsimport { AlertDialog } from '@astryx-svelte/core';
Best practices
| 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. |
Examples
Common configurations, variations, and states.AlertDialog — Loading
A confirmation dialog that shows a spinner while the action runs.