Skip to content

Drawer โ€‹

A side-anchored overlay panel that slides in from any of the four edges. Use it for detail views, filter panels, or contextual forms that don't deserve a full route. Bind open (or use the model-value alias) to control visibility, listen to mno-toggle for state changes, and pick the slide direction with position. Toggle Vue / CSS to switch the live demo and source together.

Basic โ€‹

Default right-side drawer with a header, body, and close button.

Vue SFC

Positions โ€‹

Slide in from left, right, top, or bottom.

Vue SFC

Stacked โ€‹

Set stackable to let drawers stack โ€” open a drawer from inside another, any depth. Each new drawer sits above the previous, only one backdrop dims the screen, and Esc / overlay-click affect only the topmost. Without stackable a drawer is exclusive: opening one closes any other open drawer.

Vue SFC

Sizes โ€‹

Five sizes from sm to full width / height.

Vue SFC

Resizable โ€‹

Set resizeable to let users resize the drawer by dragging the handle on the panel's inner edge โ€” width for left/right drawers, height for top/bottom. The size is clamped between a minimum and the viewport.

Vue SFC

Colors โ€‹

Six accent colors threaded through the head and scrollbar.

Vue SFC

Custom header and footer content via slots.

Vue SFC

Persistent โ€‹

Overlay click and Escape are ignored โ€” only the close button or programmatic hide() will dismiss.

Vue SFC

No overlay โ€‹

Side panel without a backdrop โ€” page behind stays interactive.

Vue SFC

Event log โ€‹

Live log of mno-toggle events with source (overlay / close / escape / manual).

Vue SFC

Customized โ€‹

Per-element overrides via cssClass (Vue) or utility classes (CSS).

Vue SFC

Types โ€‹

Importimport { DrawerProps } from 'mono-helper'
PropValueDefaultDescription
modelValuebooleanfalseTwo-way bound open state of the drawer.
position'left' | 'right' | 'top' | 'bottom''right'Edge the drawer slides in from.
size'sm' | 'md' | 'lg' | 'xl' | 'full''md'Sizing scale of the drawer panel.
color'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info''primary'Color theme applied to the drawer.
titlestring''Heading text shown in the drawer header.
dismissiblebooleantrueShows a close button and allows dismissal.
persistentbooleanfalsePrevents closing via overlay click or escape.
overlaybooleantrueRenders a backdrop overlay behind the panel.
closeOnEscapebooleantrueCloses the drawer when the Escape key is pressed.
closeOnOverlaybooleantrueCloses the drawer when the overlay is clicked.
lockScrollbooleantrueLocks body scroll while the drawer is open.
resizeablebooleanfalseAllow resizing the drawer by dragging a handle on the panel's inner edge.
stackablebooleanfalseAllow this drawer to stack on top of others. When false (default) it is exclusive โ€” opening it closes any other open drawers.
cssClassDrawerCssClass{}Per-element class overrides for internal parts.
cssClassNamestring''Extra class name applied to the drawer root.