ZBMui

Alert Dialog

View markdown

A dialog that requires a user response to proceed.

Installation

components/ui/alert-dialog.tsx

Usage

Examples

Pass variant="muted" prop to AlertDialogFooter to render a muted footer.

Controlled

Use open and onOpenChange props to control the open state of the alert dialog.

With close confirmation

Enter some text and try to close the dialog to see a confirmation alert dialog before closing.

Note: Useful when you want to prevent users from losing unsaved changes.

Backdrop variants

The backdrop of the alert dialog can be customized using the backdropVariant prop on AlertDialogPopup. The available variants are blur (default), opaque, and transparent.

Change the position of the popup by passing a position prop to AlertDialogPopup. The default position is center. Other options include top, bottom, top-left, top-right, bottom-left, bottom-right, top-center, and bottom-center.

API Reference

Alert Dialog Backdrop props

Component type props
Prop
Type
Default
Expand prop details

Alert Dialog Viewport props

Component type props
Prop
Type
Default
Expand prop details

Alert Dialog Popup props

Component type props
Prop
Type
Default
Expand prop details

Component type props
Prop
Type
Default
Expand prop details

ZBMui

Built by the ZBM.

© 2026 ZBM ui. All rights reserved.