alert-dialog

Alert Dialog

Asks the shopper to confirm or cancel an action before it happens, such as removing an address, and keeps focus inside until they choose.

States: Default

Parts

PartFileDoes
AlertDialogAlertDialog.vueGroups all parts of the alert dialog.
AlertDialogActionAlertDialogAction.vueConfirms the action the dialog asks about and closes the dialog.
AlertDialogCancelAlertDialogCancel.vueDismisses the dialog without taking the action.
AlertDialogContentAlertDialogContent.vueHolds what the alert dialog shows while open.
AlertDialogDescriptionAlertDialogDescription.vueExplains what the action in the dialog will do.
AlertDialogFooterAlertDialogFooter.vueHolds the cancel and confirm buttons at the bottom of the dialog.
AlertDialogHeaderAlertDialogHeader.vueGroups the title and description at the top of the dialog.
AlertDialogMediaAlertDialogMedia.vueHolds an icon or image that illustrates the dialog.
AlertDialogTitleAlertDialogTitle.vueNames the action the dialog asks the user to confirm.
AlertDialogTriggerAlertDialogTrigger.vueOpens the alert dialog.

Anatomy

<AlertDialog>
  <AlertDialogTrigger />
  <AlertDialogContent>
    <AlertDialogHeader>
      <AlertDialogMedia />
      <AlertDialogTitle />
      <AlertDialogDescription />
    </AlertDialogHeader>
    <AlertDialogFooter>
      <AlertDialogCancel />
      <AlertDialogAction />
    </AlertDialogFooter>
  </AlertDialogContent>
</AlertDialog>

Styling

PartRecipe
AlertDialogContentalert-dialog-content
AlertDialogContentalert-dialog-overlay
AlertDialogDescriptionalert-dialog-description
AlertDialogFooteralert-dialog-footer
AlertDialogHeaderalert-dialog-header
AlertDialogMediaalert-dialog-media
AlertDialogTitlealert-dialog-title

Install

Writes 11 files into components/ui/alert-dialog/. For agents, npx @frontic/ui docs alert-dialog prints this reference as markdown; the MCP server serves the same.

Installs with it
button
npm packages
@vueuse/core
class-variance-authority
reka-ui

Built from

API reference

AlertDialog AlertDialog.vue

Groups all parts of the alert dialog.

PropTypeDefault
unmountOnHidebooleantrue
openbooleanfalse
defaultOpenbooleanfalse
EventPayload
update:openvalue: boolean
SlotSlot props
default{ open: boolean; close: () => void; }

AlertDialogAction AlertDialogAction.vue

AlertDialogCancel AlertDialogCancel.vue

AlertDialogContent AlertDialogContent.vue

AlertDialogDescription AlertDialogDescription.vue

AlertDialogFooter AlertDialogFooter.vue

AlertDialogHeader AlertDialogHeader.vue

AlertDialogMedia AlertDialogMedia.vue

AlertDialogTitle AlertDialogTitle.vue

AlertDialogTrigger AlertDialogTrigger.vue

Example