Alert Dialog
A modal dialog that interrupts the user with important content and expects a response.
Installation
Usage
<AlertDialog>
<AlertDialogTrigger>
<Render>
<Button @attributes="context.Attributes" Variant="ButtonVariant.Outline">Show Dialog</Button>
</Render>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
This action cannot be undone. This will permanently delete your account from our servers.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Continue</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>Composition
Use the following composition to build an AlertDialog:
AlertDialog
├── AlertDialogTrigger
└── AlertDialogContent
├── AlertDialogHeader
│ ├── AlertDialogMedia
│ ├── AlertDialogTitle
│ └── AlertDialogDescription
└── AlertDialogFooter
├── AlertDialogCancel
└── AlertDialogActionBasic
A basic alert dialog with a title, description, and cancel and continue buttons.
Small
Use the size="sm" parameter to make the alert dialog smaller.
Media
Use the AlertDialogMedia component to add a media element such as an icon or image to the alert dialog.
Small with Media
Use the size="sm" parameter to make the alert dialog smaller and the AlertDialogMedia component to add a media element such as an icon or image to the alert dialog.
Destructive
Use the AlertDialogAction component to add a destructive action button to the alert dialog.
RTL
To enable RTL support in Blazix, see the RTL configuration guide.
Translated with AI for the demo, so it may have mistakes.
API Reference
AlertDialog
AlertDialogAction
Other attributes are passed to the element it renders.
AlertDialogCancel
Other attributes are passed to the element it renders.
AlertDialogContent
Other attributes are passed to the element it renders.
AlertDialogDescription
Other attributes are passed to the element it renders.
AlertDialogFooter
Other attributes are passed to the element it renders.
AlertDialogHeader
Other attributes are passed to the element it renders.
AlertDialogMedia
Other attributes are passed to the element it renders.
AlertDialogOverlay
Other attributes are passed to the element it renders.
AlertDialogTitle
Other attributes are passed to the element it renders.
AlertDialogTrigger
Other attributes are passed to the element it renders.