Alert Dialog
A modal dialog that interrupts the user with important content and expects a response. Uses role=alertdialog and cannot be dismissed by Escape or clicking outside.
Basic
A simple confirmation dialog with Cancel and Continue actions.
Destructive
A destructive confirmation dialog with a styled delete action.
Usage
julia
using Suite
AlertDialog(
AlertDialogTrigger(
Button(variant="outline", "Show Alert Dialog")
),
AlertDialogContent(
AlertDialogHeader(
AlertDialogTitle("Are you sure?"),
AlertDialogDescription("This action cannot be undone."),
),
AlertDialogFooter(
AlertDialogCancel("Cancel"),
AlertDialogAction("Continue"),
),
),
)Keyboard Interactions
| Key | Action |
|---|---|
| Tab | Move focus between Cancel and Action buttons |
| Enter / Space | Activate the focused button |
API Reference
AlertDialog
| Prop | Type | Default | Description |
|---|---|---|---|
| children... | Any | - | AlertDialog sub-components |
| class | String | "" | Additional CSS classes |
AlertDialogTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
| children... | Any | - | Element that opens the dialog |
| class | String | "" | Additional CSS classes |
AlertDialogContent
| Prop | Type | Default | Description |
|---|---|---|---|
| children... | Any | - | Dialog content (header, footer, etc.) |
| class | String | "" | Additional CSS classes |
AlertDialogHeader
| Prop | Type | Default | Description |
|---|---|---|---|
| children... | Any | - | Header content (title, description) |
| class | String | "" | Additional CSS classes |
AlertDialogFooter
| Prop | Type | Default | Description |
|---|---|---|---|
| children... | Any | - | Footer content (action buttons) |
| class | String | "" | Additional CSS classes |
AlertDialogTitle
| Prop | Type | Default | Description |
|---|---|---|---|
| children... | Any | - | Dialog title text |
| class | String | "" | Additional CSS classes |
AlertDialogDescription
| Prop | Type | Default | Description |
|---|---|---|---|
| children... | Any | - | Dialog description text |
| class | String | "" | Additional CSS classes |
AlertDialogAction
| Prop | Type | Default | Description |
|---|---|---|---|
| children... | Any | - | Action button text (e.g. "Continue", "Delete") |
| class | String | "" | Additional CSS classes |
AlertDialogCancel
| Prop | Type | Default | Description |
|---|---|---|---|
| children... | Any | - | Cancel button text (e.g. "Cancel") |
| class | String | "" | Additional CSS classes |