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.

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

All of Alert Dialog’s styles live in alert-dialog.json. New to styling in Frontic UI? How styling works →

Install

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

Built from

API reference

AlertDialog.vue

Groups all parts of the alert dialog.

Props 3

PropTypeDefault
unmountOnHidebooleantrue
openbooleanfalse
defaultOpenbooleanfalse

Events 1

EventPayload
update:openvalue: boolean

Slots 1

SlotSlot props
default{ open: boolean; close: () => void; }

AlertDialogAction.vue

AlertDialogCancel.vue

AlertDialogContent.vue

AlertDialogDescription.vue

AlertDialogFooter.vue

AlertDialogHeader.vue

AlertDialogMedia.vue

AlertDialogTitle.vue

AlertDialogTrigger.vue
Alert Dialog