Dialog
Modal dialog window displayed above the page.
API Reference
DialogRoot & AlertDialogRoot
Contains all the parts of a dialog.
DialogTrigger & AlertDialogTrigger
Wraps the control that will open the dialog. Usually used with Button:
vue
<template>
<DialogRoot>
<DialogTrigger as-child>
<Button>Open dialog</Button>
</DialogTrigger>
<DialogPopup>...</DialogPopup>
</DialogRoot>
</template>DialogPopup
AlertDialogPopup
DialogTitle & AlertDialogTitle
DialogDescription & AlertDialogDescription
DialogCloseButton & AlertDialogCancelButton
A cross icon to close the dialog.
DialogClose & AlertDialogCancel
Reka UI's native DialogClose component without any styles. Usually used with Button:
vue
<template>
<DialogRoot>
<DialogPopup>
<Button :as="DialogClose">Close</Button>
</DialogPopup>
</DialogRoot>
</template>AlertDialogAction
Examples
Size
Use the size prop to control size of the dialog. It will affect the padding, border-radius and max-width of the popup.
Alert Dialog
For alert-style dialogs, use the alert-specific components:
AlertDialogRoot, AlertDialogTrigger, AlertDialogPopup, AlertDialogTitle, AlertDialogDescription, AlertDialogCancel, AlertDialogAction.