UIIcons

Alert Dialog

A modal dialog that interrupts the user with important content and requires a response.

Alert Dialog

Installation

pnpm dlx stera-ui@latest add alert-dialog

Composition

Use the following composition to build an AlertDialog:

AlertDialog
├── AlertDialogTrigger
└── AlertDialogContent
    ├── AlertDialogHeader
    │   ├── AlertDialogMedia
    │   ├── AlertDialogTitle
    │   └── AlertDialogDescription
    └── AlertDialogFooter
        ├── AlertDialogCancel
        └── AlertDialogAction

Examples

With Media

With Media

Use AlertDialogMedia to display an icon above the title for additional visual context.

Small Size

Small Size

Destructive

Destructive

Pass variant="danger" to AlertDialogAction for destructive confirmations.

API Reference

Built on Base UI's Alert Dialog primitive — see the full API reference there.

AlertDialogContent

PropTypeDefault
size"default" | "sm""default"

AlertDialogAction

PropTypeDefault
variant"default" | "danger""default"

AlertDialogTrigger

PropTypeDescription
renderReactElementRender prop for the trigger element