GhostDrawerContent reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Headless edge-anchored drawer surface for GhostDrawer. Shares GhostDialogContent's focus scope, dismissable layer, scroll lock, and inert isolation; sets data-side and a portal-safe data-dir (plus dir="rtl" when right-to-left) so themes can map logical sides to physical viewport edges. Unmounted while closed. After logical close it stays mounted with data-state="closed", inert, and pointer-events: none only while its own CSS exit transition or animation runs (useGhostPresence), then unmounts; focus, dismissal, scroll lock, and background inert release immediately.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
as | GhostDrawerContentElement | "div" | No | Tag name or component rendered for the drawer surface. |
closeOnEscape | boolean | true | No | Dismisses the topmost open layer on `Escape`. |
closeOnOutsideClick | boolean | — | No | Dismisses the drawer on outside pointerdown (`true` for `'dialog'`, `false` for `'alertdialog'` by default). |
dir | GhostDrawerDirection | — | No | Overrides the root `dir` when provided. |
portal | boolean | true | No | Teleport content through `GhostPortal` when `true`, or render inline when `false`. |
portalTo | GhostPortalTarget | "body" | No | Teleport target passed to `GhostPortal` when `portal` is `true`. |
role | GhostDrawerContentRole | "dialog" | No | Semantic ARIA role for the drawer surface (`'dialog'` or `'alertdialog'`). |
side | GhostDrawerSide | — | No | Overrides the root `side` when provided. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
default | Drawer heading, description, body content, and action controls rendered while open. |
Slot props: default
None declared.
Exposed members
| Name | Type | Description |
|---|---|---|
blur | () => void | Removes focus from the drawer surface element. |
element | HTMLElement | null | Mounted drawer surface element while open or exiting; null once unmounted. |
focus | (options?: FocusOptions) => void | Focuses the drawer surface element when mounted. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | content | Drawer surface marked with class ghost-drawer-content, data-part="content", data-side, and data-dir="ltr" | "rtl". |
data-state | open | Applied on data-state while mounted and open. |
data-state | closed | Applied on data-state while the surface plays its exit motion after logical close; the surface is also inert with inline pointer-events: none until it unmounts. |
data-state | side | data-side reports the effective side (content override or root side). |
CSS variables
None declared.
Accessibility
Role: dialog. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/.
Required ARIA attributes: aria-labelledby.
Keyboard
| Key | Action | Automated browser test |
|---|---|---|
Escape | Dismisses the topmost open drawer when closeOnEscape is true. | Not reviewed |
Tab | Cycles forward within modal drawers; moves freely in non-modal drawers. | Not reviewed |
Shift+Tab | Cycles backward within modal drawers; moves freely in non-modal drawers. | Not reviewed |
Verification
Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.
| Category | Status | Evidence |
|---|---|---|
| Automated keyboard | Not reviewed | No declared key is mapped to a browser test yet. |
| Manual interaction | Not reviewed | No review recorded. |
| Assistive technology | Not reviewed | No review recorded. |
Examples
None declared.