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 the useImperativeAlertDialog hook: call alert.show(options) and render alert.element in your tree.
ts
import { AlertDialog } from '@astryx-svelte/core';

Best practices

GuidancePractices
DoMake the action button label specific: "Delete project" is better than "OK" or "Confirm".
DoDescribe what will happen in the description so the user knows the consequences before confirming.
Don'tUse 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.