Alert Dialog
betaA confirmation modal whose card springs up out of a blur while the backdrop blurs in behind it; the destructive tone shakes its icon once on open.
- Overlays
- 1 file
- 2 npm packages
- Accessibility notes
pnpm dlx @dowel-ui/cli add alert-dialognpm packages installed: class-variance-authority, radix-ui.
import { AlertDialog } from "@/components/ui/alert-dialog";Default
Confirmation
Without Icon
Custom Media
<AlertDialogOverlay>
Every prop of Radix UI’s AlertDialog.Overlay, plus className.
<AlertDialogContent>
| Prop | Type | Default |
|---|---|---|
tone | "default" | "destructive" | "default" |
Every prop of Radix UI’s AlertDialog.Content, plus className.
<AlertDialogHeader>
| Prop | Type | Default |
|---|---|---|
iconAn icon shown in a tile above the title. In the destructive tone it shakes once on open. | ReactNode | — |
Plus every attribute of <div>.
<AlertDialogMedia>
Plus every attribute of <div>.
<AlertDialogFooter>
Plus every attribute of <div>.
<AlertDialogTitle>
Every prop of Radix UI’s AlertDialog.Title, plus className.
<AlertDialogDescription>
Every prop of Radix UI’s AlertDialog.Description, plus className.
<AlertDialogAction>
Every prop of Radix UI’s AlertDialog.Action, plus className.
<AlertDialogCancel>
Every prop of Radix UI’s AlertDialog.Cancel, plus className.
7/7
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — does not apply
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes