Drawer

An edge panel with close approval, scoped regions, nesting and resizing.

Drawer

Default

Open with v-model and use a scoped footer to request closing.

Placement and size

Choose one of four edges and a CSS length or the default/large preset. Direction ltr/rtl/ttb/btt is also supported.

Slots and regions

Header, title, extra, footer and close artwork are independent. Scoped slots receive close, titleId, titleClass, state and live size. Region styles apply to mask, wrapper, header, body and footer.

Before close

Return a Promise or accept done(cancel?). Rejection shows a notification; false or done(true) keeps the drawer quietly. All controlled closing requests share approval. With a guard, overlay clicks require a local explicit true. Pending requests are deduplicated and loader exits finish before closing. Component destruction and forced ancestor closing release pending work.

Content lifecycle

Content mounts lazily and is retained after closing. destroy-on-close resets component-local state after the exit; force-render mounts ahead of opening and keeps content. open-delay and close-delay control request timing. Legacy open/close and opened/closed report animation completion; before-open/before-close report the start.

Nested drawers

Nested drawers share z-index, Escape ownership and scroll locking. push controls the parent displacement. Closing the parent also closes visible child drawers.

Mounting and modality

Teleport is enabled by default. append-to/get-container select a target; teleported=false or get-container=false renders inline. Positioned containers define local bounds. mask=false with modal-penetrable and lock-scroll=false allows page interaction.

Loading

The default content instance stays mounted during loading. The loading slot receives the active loading request and can render a custom indicator. SLogoLoading-based indicators participate in completion waiting.

Resizable

Drag the edge; the handle supports arrow keys, Shift, Home and End. v-model:size receives pixels, and update:width/update:height follows the active axis. Resize events provide size, placement and the input event.

Shape

Rounded and square panels follow local props and shared configuration.

API

PROPS

Property
Type
Values
Description
default
Example
More
v-model
Boolean
true | false
Controlled visibility; open takes precedence when provided.
false
v-model:open
Boolean
true | false
Controlled visibility; open takes precedence when provided.
false
placement
left | right | top | bottom
Edge used to open the drawer.
right
direction
ltr | rtl | ttb | btt
Direction alias; when provided it overrides placement.
—
size
String | Number
CSS length | medium | large
Width for left/right and height for top/bottom; default is 360px, large is 736px.
360px
width
String | Number
CSS length
Overrides size for left/right drawers.
—
height
String | Number
CSS length
Overrides size for top/bottom drawers.
—
title
String | VNodeChild | render function
Region content; the matching slot takes precedence.
—
extra
String | VNodeChild | render function
Region content; the matching slot takes precedence.
—
footer
String | VNodeChild | render function
Region content; the matching slot takes precedence.
—
with-header
Boolean
true | false
Show the header; hiding it keeps an independent floating close control.
true
show-close
Boolean
true | false
Show the built-in close control, independently from the title.
true
closable
Boolean
true | false
Alias of show-close; overrides it when supplied.
—
close-icon
icon name | VNodeChild | render function
Custom close artwork; the close-icon slot takes precedence.
—
header-aria-level
String | Number
1–6
Heading level used by the default title.
2
aria-label
String
accessible name
Accessible name, useful without a visible header.
—
mask
Boolean
true | false
Show the overlay.
true
modal
Boolean
true | false
Alias of mask; overrides it when supplied.
—
modal-penetrable
Boolean
true | false
Allow page interaction when mask is false; focus trapping defaults to off in this mode.
false
mask-closable
Boolean
true | false
Request closing on overlay clicks. With before-close, only a local explicit true enables this entry.
true; explicit opt-in when guarded
close-on-click-modal
Boolean
true | false
Alias of mask-closable, following the same guarded opt-in rule.
—
keyboard
Boolean
true | false
Allow the top overlay to request closing with Escape.
true
close-on-press-escape
Boolean
true | false
Alias of keyboard; overrides it when supplied.
—
before-close
Promise approval | done(cancel?) callback
Approval for controls, exposed close and v-model false requests. Rejection keeps the drawer and notifies the reason; false or done(true) veto silently.
—
teleported
Boolean
true | false
Teleport to the selected mounting target.
true
append-to-body
Boolean
true | false
Alias of teleported.
—
append-to
String | HTMLElement
CSS selector | HTMLElement
Mounting target; takes precedence over get-container. Containers need a positioning context.
—
get-container
selector | HTMLElement | function | false
Compatibility target getter; false renders inline.
—
lock-scroll
Boolean
true | false
Lock body scrolling while present; nested overlays share ownership.
true
auto-focus
Boolean
true | false
Focus the panel automatically; open-auto-focus can prevent it.
true
autofocus
Boolean
true | false
Compatibility alias of auto-focus.
—
trap-focus
Boolean
true | false
Keep keyboard focus inside the top drawer; defaults to enabled unless penetrable.
—
restore-focus
Boolean
true | false
Restore the opener after closing; close-auto-focus can prevent it.
true
open-delay
Number
milliseconds
Delay displaying an opening request.
0
close-delay
Number
milliseconds
Delay approved closing; ancestor teardown does not wait for this delay.
0
destroy-on-close
Boolean
true | false
Destroy content after the closing animation.
false
force-render
Boolean
true | false
Mount content before first opening; takes precedence over destroy-on-close.
false
z-index
Number
stack level
Override the shared overlay level; descendants use a higher layer.
—
push
Boolean | 
false | true | { distance: CSS length }
Push the parent panel while a nested drawer is open; default distance is 180px.
true
loading
Boolean
true | false
Show body loading without destroying content; complete the compact exit before restoring it.
false
resizable
Boolean
true | false
Enable an accessible edge resize handle.
false
min-size
String | Number
CSS length
Minimum resize extent, clamped to the available container.
120
max-size
String | Number
CSS length
Maximum resize extent; defaults to the available container.
—
resize-step
Number
pixels
Arrow-key step; Shift multiplies it by five.
10
resize-label
String
accessible name
Accessible name for the resize handle.
—
shape
String
rounded | square
Resolve panel geometry through the shared shape configuration.
ConfigProvider or rounded
root-class-name
String
class name
Add classes to the corresponding region.
—
modal-class
String
class name
Add classes to the corresponding region.
—
header-class
String
class name
Add classes to the corresponding region.
—
body-class
String
class name
Add classes to the corresponding region.
—
footer-class
String
class name
Add classes to the corresponding region.
—
root-style
CSSProperties
CSS properties
Style the corresponding region without replacing built-in structure.
—
content-wrapper-style
CSSProperties
CSS properties
Style the corresponding region without replacing built-in structure.
—
mask-style
CSSProperties
CSS properties
Style the corresponding region without replacing built-in structure.
—
header-style
CSSProperties
CSS properties
Style the corresponding region without replacing built-in structure.
—
body-style
CSSProperties
CSS properties
Style the corresponding region without replacing built-in structure.
—
footer-style
CSSProperties
CSS properties
Style the corresponding region without replacing built-in structure.
—
class-names
mask | wrapper | header | body | footer
Classes grouped by semantic region.
—
styles
mask | wrapper | header | body | footer
Styles grouped by semantic region.
—

EVENTS

Event
Type
Description
default
Example
More
update:modelValue
Boolean
Visibility update.
—
—
update:open
Boolean
Visibility alias update.
—
—
update:size
Number
Resize extent in pixels.
—
—
update:width
Number
Resized horizontal extent.
—
—
update:height
Number
Resized vertical extent.
—
—
before-open
() => void
Opening starts.
—
—
before-close
() => void
Approved closing starts.
—
—
open
() => void
Opening animation completes.
—
—
opened
() => void
Opening animation completes.
—
—
close
() => void
Closing animation completes.
—
—
closed
() => void
Closing animation completes.
—
—
after-open-change
Boolean
Animation completes with the final visibility.
—
—
close-request
Closing request; a second optional parameter is the initiating event.
—
—
close-error
unknown
Rejected or failed approval; second parameter is the close reason.
—
—
open-auto-focus
Event
Before default focusing; preventDefault overrides it.
—
—
close-auto-focus
Event
Before restoring the opener; preventDefault overrides it.
—
—
resize-start
Resize gesture or keyboard adjustment starts.
—
—
resize
Resize extent updates.
—
—
resize-end
Resize completes or is terminated.
—
—

SLOTS

Slot
Scope
Description
default
Example
More
default
Body content.
—
header
Replace heading content while retaining close and extra controls.
—
title
Customize the default title wrapper.
—
extra
Header actions.
—
footer
Footer actions.
—
close-icon
Close control artwork.
—
closeIcon
Compatibility alias of close-icon.
—
loading
Custom body loading feedback.
—
mask
Decorative overlay content.
—
resizer
Resize-handle content; built-in gesture and keyboard behavior remains.
—

EXPOSES

Method
Type
Description
default
Example
More
open
() => void
Request opening.
—
—
handleOpen
() => void
Alias of open.
—
—
close
(reason?: ) => Promise<boolean>
Request guarded closing; resolves whether approval was accepted.
—
—
handleClose
(reason?: ) => Promise<boolean>
Alias of close.
—
—
focus
() => void
Focus the panel.
—
—
visible
Boolean
Current display state.
—
—
size
String | Number
Current extent, including local resizing.
—
—
resizing
Boolean
Whether a pointer gesture is in progress.
—
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied