Skip to content

GhostDialog reference ​

Package: @ghostvue/themes. Status: experimental (stability policy).

Themed wrappers around headless GhostDialog, GhostDialogTrigger, GhostDialogOverlay, GhostDialogContent, GhostDialogTitle, GhostDialogDescription, and GhostDialogClose. Importing from @ghostvue/themes loads the default elevation-4 dialog and scrim stylesheet.

Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.

All component references

Props ​

NameTypeDefaultRequiredDescription
openboolean—NoControlled open state forwarded to headless GhostDialog.
defaultOpenbooleanfalseNoInitial open state when open is omitted.
modalbooleantrueNoEnables modal behavior (trapped focus, scroll lock, inert background, overlay).

Emits ​

None declared.

Models ​

PropEventTypeDescription
openupdate:openbooleanv-model:open binding for controlled state.

Slots ​

NameDescription
defaultDialog trigger, overlay, content, title, description, and close parts.

Slot props: default ​

NameTypeDescription
openbooleanCurrent open state.
close() => voidCloses the dialog.

Exposed members ​

None declared.

Parts and data attributes ​

AttributeValueDescription
data-parttriggerTrigger control rendered by GhostDialogTrigger.
data-partoverlayFull-viewport backdrop rendered by GhostDialogOverlay with data-themed.
data-partcontentCentered elevation-4 dialog surface rendered by GhostDialogContent with data-themed.
data-parttitleAccessible heading rendered by GhostDialogTitle.
data-partdescriptionMuted supporting description rendered by GhostDialogDescription.
data-partcloseClose control rendered by GhostDialogClose.
data-stateopenApplied to trigger, overlay, and content while open.
data-stateclosedApplied to trigger while closed.

CSS variables ​

NameDescription
--ghost-scrimShared semantic backdrop color of GhostDialogOverlay, supplied by the theme.
--ghost-elevation-4-bgSurface background color of GhostDialogContent.
--ghost-elevation-4-borderBorder color of GhostDialogContent.
--ghost-elevation-4-shadowDrop shadow of GhostDialogContent.
--ghost-elevation-4-highlightInner highlight shadow of GhostDialogContent.
--ghost-border-hairline-widthBorder thickness.
--ghost-radius-lgCorner radius of GhostDialogContent.
--ghost-surface-fgForeground text color.
--ghost-text-mutedMuted text color applied to GhostDialogDescription.
--ghost-space-inset-lgInternal padding and viewport margin of GhostDialogContent.
--ghost-space-gap-mdVertical spacing between sections inside GhostDialogContent.
--ghost-focus-ring-colorOuter focus-visible outline color when content receives focus.
--ghost-focus-ring-contrastInner focus-visible halo color.
--ghost-focus-ring-offsetFocus-visible outline offset.
--ghost-focus-ring-widthFocus-visible outline width.

Accessibility ​

Role: dialog. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/.

Required ARIA attributes: aria-expanded, aria-controls, aria-haspopup, aria-labelledby.

Keyboard ​

KeyActionAutomated browser test
EnterOpens or toggles the dialog when focused on the trigger, or closes when focused on GhostDialogClose.Not reviewed
SpaceOpens or toggles the dialog when focused on the trigger, or closes when focused on GhostDialogClose.Not reviewed
TabCycles forward within modal dialogs.Not reviewed
Shift+TabCycles backward within modal dialogs.Not reviewed
EscapeDismisses the topmost open dialog when closeOnEscape is true and restores focus.Not reviewed

Verification ​

Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.

CategoryStatusEvidence
Automated keyboardNot reviewedNo declared key is mapped to a browser test yet.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

dialog/edit-profile ​

Example source

Profile editor

Profile card with an edit dialog: validated fields, a scrolling form on short screens, and real save and cancel outcomes.

AL

Ada Lovelace

Research engineer

Work email
ada@analytical-engines.example
Bio
Writes the notes that turn the Analytical Engine from a calculator into a general-purpose machine. Currently documenting loops and conditional branching for the next release.

dialog/themed ​

Example source

Long content

Release notes on the elevation-4 surface that scroll inside the dialog when taller than the viewport.

dialog/nested ​

Example source

Nested

A confirmation stacked on a share dialog; Escape dismisses only the innermost layer and focus returns to the outer dialog.

dialog/alert ​

Example source

Alert dialog

Destructive confirmation with role="alertdialog", outside-click dismissal disabled, and a status after confirming.