dialog

Dialog

A modal window over the page, with a header, a body that scrolls when it outgrows the screen, and a footer for actions such as save and cancel.

States: Default

Parts

PartFileDoes
DialogDialog.vueGroups all parts of the dialog.
DialogBodyDialogBody.vueHolds the dialog's main content and scrolls it when the dialog outgrows the screen, keeping the header and footer in view.
DialogCloseDialogClose.vueCloses the dialog.
DialogContentDialogContent.vueHolds what the dialog shows while open.
DialogDescriptionDialogDescription.vueExplains the purpose of the dialog below its title.
DialogFooterDialogFooter.vueHolds the actions of the dialog, such as confirm and cancel buttons.
DialogHeaderDialogHeader.vueGroups the title and description at the top of the dialog.
DialogOverlayDialogOverlay.vueCovers the page behind the open dialog.
DialogScrollContentDialogScrollContent.vueHolds what the dialog shows while open, scrolling when the content is tall.
DialogTitleDialogTitle.vueNames the dialog.
DialogTriggerDialogTrigger.vueOpens the dialog.

Anatomy

<Dialog>
  <DialogTrigger />
  <DialogContent>
    <DialogHeader>
      <DialogTitle />
      <DialogDescription />
    </DialogHeader>
    <DialogBody />
    <DialogFooter>
      <DialogClose />
    </DialogFooter>
  </DialogContent>
</Dialog>

Styling

PartRecipe
DialogBodydialog-body
DialogContentdialog-content
DialogDescriptiondialog-description
DialogFooterdialog-footer
DialogHeaderdialog-header
DialogOverlaydialog-overlay
DialogScrollContentdialog-content
DialogScrollContentdialog-overlay
DialogTitledialog-title

Install

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

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

Built from

API reference

Dialog Dialog.vue

Groups all parts of the dialog.

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

DialogBody DialogBody.vue

DialogClose DialogClose.vue

DialogContent DialogContent.vue

DialogDescription DialogDescription.vue

DialogFooter DialogFooter.vue

DialogHeader DialogHeader.vue

DialogOverlay DialogOverlay.vue

DialogScrollContent DialogScrollContent.vue

DialogTitle DialogTitle.vue

DialogTrigger DialogTrigger.vue

Example