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
| Part | File | Does |
|---|---|---|
| AlertDialog | AlertDialog.vue | Groups all parts of the alert dialog. |
| AlertDialogAction | AlertDialogAction.vue | Confirms the action the dialog asks about and closes the dialog. |
| AlertDialogCancel | AlertDialogCancel.vue | Dismisses the dialog without taking the action. |
| AlertDialogContent | AlertDialogContent.vue | Holds what the alert dialog shows while open. |
| AlertDialogDescription | AlertDialogDescription.vue | Explains what the action in the dialog will do. |
| AlertDialogFooter | AlertDialogFooter.vue | Holds the cancel and confirm buttons at the bottom of the dialog. |
| AlertDialogHeader | AlertDialogHeader.vue | Groups the title and description at the top of the dialog. |
| AlertDialogMedia | AlertDialogMedia.vue | Holds an icon or image that illustrates the dialog. |
| AlertDialogTitle | AlertDialogTitle.vue | Names the action the dialog asks the user to confirm. |
| AlertDialogTrigger | AlertDialogTrigger.vue | Opens 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
- npm packages
- @vueuse/core
- class-variance-authority
- reka-ui
Built from
API reference
Groups all parts of the alert dialog.
Props 3
| Prop | Type | Default | |
|---|---|---|---|
| unmountOnHide | boolean | true | |
| |||
| open | boolean | false | |
| |||
| defaultOpen | boolean | false | |
| |||
Events 1
| Event | Payload | |
|---|---|---|
| update:open | value: boolean | |
| ||
Slots 1
| Slot | Slot props | |
|---|---|---|
| default | { open: boolean; close: () => void; } | |
| ||