Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Dialog

A dialog component with region slots, focus trap, and backdrop.

vu-dialog · @velkin/react/dialog

Copy page

Import

React
npm i @velkin/react

import { VuDialog } from "@velkin/react/dialog";

Examples

API

Props

PropTypeDefaultDescription
openbooleanfalseWhether the dialog is visible. Default: `false`.
closablebooleanfalseShows a dismiss control in the corner. Default: `false`.
closeLabelstring""Accessible name for the dismiss control; empty uses locale catalog. Default: `""`.
ariaLabelstring""Accessible name when the header slot is empty. Default: `""`.
variantVuDialogVariant"elevated"Surface paint recipe. Default: `"elevated"`.
toneVuDialogTone"normal"Neutral surface weight. Default: `"normal"`.
sizeVuDialogSize"md"Padding scale for header, body, and footer (`sm`/`md`/`lg`). Default: `"md"`.
radiusVuDialogRadius"md"Panel corner preset (`sm`/`md`/`lg`; Role C′ omits `none`/`full`). Default: `"md"`.
dividerbooleanfalseHairlines between shown regions. Default: `false`.
persistentbooleanfalseBlocks backdrop and Escape close. Default: `false`.
closeOnEscbooleantrueEscape emits `vu-close` when topmost. Default: `true`.
maxWidthstring""Optional CSS max-width; empty keeps `auto`. Default: `""`.
maxHeightstring""Optional CSS max-height; empty keeps `auto`. Default: `""`.

Events

EventDetailDescription
vu-closeVuDialogCloseDetailCancelable close intent; parent sets `open` false when not prevented.
vu-openCustomEvent<void>When the dialog begins opening.
vu-afteropenCustomEvent<void>After the open animation finishes.
vu-aftercloseCustomEvent<void>After the close animation finishes.

Slots

SlotDescription
headerTitle or toolbar row at the top.
bodyMain content region.
footerAction buttons at the bottom.

CSS parts

PartDescription
dialogNative `<dialog>` surface.
close-buttonDismiss control when `closable`.
headerHeader slot wrapper.
header-dividerHairline below the header when `divider` is set.
bodyBody slot wrapper.
footer-dividerHairline above the footer when `divider` is set.
footerFooter slot wrapper.

Methods

MethodDescription
show- Sets `open` to true.
hide- Sets `open` to false.
toggle- Toggles `open`.
focus- Focuses the dialog element.

Types

NameDefinition
VuDialogCloseDetail
{ reason: VuDialogCloseReason; }
VuDialogRadius
"sm" | "md" | "lg"
VuDialogSize
"sm" | "md" | "lg"
VuDialogTone
"subtle" | "normal" | "strong"
VuDialogVariant
"outline" | "elevated" | "soft" | "ghost" | "filled"

Related

Feedback

  • AlertAn alert component with intent colors, variants, and optional dismiss.
  • DrawerA drawer component with slide-in panel, backdrop, and focus trap.
  • NotificationA notification component that renders the toast viewport.
  • OverlayAn overlay component with backdrop and centered content slot.
  • PopoverA popover component with smart placement and a trigger slot.
  • ProgressA progress component with linear, ring, and indeterminate modes.

Guides

  • AccessibilityLabels and overlays
  • AppearanceStatus colors

Browse

  • Previous: AlertEarlier in the sidebar
  • Next: DrawerLater in the sidebar
  • All componentsBrowse the full index