Search documentation

Find a component or a docs page

Alert Dialog

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

Usage

Example

Small

Pass size: :sm to AlertDialogContent for a narrower dialog with the footer buttons side by side.

Media

AlertDialogMedia shows an icon next to the title (above it on small screens or with size: :sm).

Inside a form

The dialog renders in place, and HTML does not allow nested forms: a button_to inside AlertDialogAction loses its own form and submits the outer one instead. Render the AlertDialog after the form, or give the action button a form attribute that points to a form elsewhere on the page.

Installation

Components

ComponentBuilt usingSource
AlertDialogPhlex
AlertDialogActionPhlex
AlertDialogCancelPhlex
AlertDialogContentPhlex
AlertDialogDescriptionPhlex
AlertDialogDocsPhlex
AlertDialogFooterPhlex
AlertDialogHeaderPhlex
AlertDialogMediaPhlex
AlertDialogTitlePhlex
AlertDialogTriggerPhlex
AlertDialogControllerStimulus JS