Skip to content
Star

PxDrawer

A slide-in side panel (drawer/sidebar) that appears from the edge of the screen. Supports left, right, top, and bottom positions. Useful for detail panels and filter sidebars.

Usage

Demo

Props

PropTypeDefaultDescription
visiblerequiredbooleanControls drawer open/close state. Use with v-model:visible.
headerstringundefinedDrawer header title.
position'left' | 'right' | 'top' | 'bottom''right'Which edge the drawer slides in from.
closablebooleantrueShows the × close button, and enables closing via the Escape key and clicking the backdrop.
styleRecord<string, string>undefinedInline styles for the drawer panel.

No size prop

The drawer's width (left/right positions) is a fixed 550px and its height (top/bottom) is capped at 80vh, both set in CSS — there's no prop to override this today. The backdrop is also always shown; there's no way to render the drawer without one.

Emits

EventPayloadDescription
update:visiblebooleanEmitted with false when the drawer should close.

Slots

SlotDescription
defaultDrawer body content.
headerCustom header rendering (replaces the header prop text).

Built with VitePress