Dialog

Modal dialog for confirmations, forms, and destructive alerts, with a focus trap, escape handling, and an overlay scrim.

import {
Dialog,
DialogBody,
DialogClose,
DialogContent,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@plexui/vue/components/Dialog";

Examples

Overview

Destructive confirmation

Scrolling body

Placement

placement

API

Dialog (root)

PropTypeDefaultDescription
open / v-model:openboolean—Controlled open state; uncontrolled when omitted
@update:open(open: boolean) => void—Fires when the dialog opens or closes

DialogContent

PropTypeDefaultDescription
widthnumber | string480Panel width
show-closebooleantrueShow close button in top-right corner
classstring—Additional CSS class on the panel
placement"center" | "top" | "bottom" | "start" | "end" | "fullscreen""center"Where the panel sits: centered, near the top, a bottom sheet, a side panel, or the whole screen
mobile-placement"center" | "bottom" | "fullscreen"—Placement at 640px and below; defaults to placement
@open-auto-focus(event: Event) => void—Called when focus moves into the dialog on open; call event.preventDefault() to place it yourself, for example on the panel instead of the first field
@close-auto-focus(event: Event) => void—Called when focus returns on close; call event.preventDefault() to keep it elsewhere

DialogTrigger: opens the dialog; renders its child element (Reka's as-child).

DialogHeader: wrapper for title and description.

DialogTitle: accessible heading for the dialog.

DialogDescription: supporting text under the title.

DialogBody: the scrolling part between the header and the footer. With it, only the body scrolls. Accepts class.

DialogFooter: footer area for action buttons.

DialogClose: closes the dialog when its child is activated.

Styling

Dialog has no component tokens of its own. It reads the shared semantic color, typography and spacing tokens listed in Design tokens, so it follows theme changes made there.