interface QDrawerProps extends HTMLAttributes<HTMLDivElement>
?: QDrawerBehaviorOptions = "default"
?: boolean = false?: number = BREAKPOINTS.md?: boolean = undefined?: boolean = false?: boolean = false?: boolean = false?: boolean = undefined?: QDrawerSideOptions = "start"
?: `${number}%` = "30%"?: boolean = $bindable(false)
?: number = 360value prop which determines if it's open or closed. Modal
drawers keep keyboard focus inside and return it when closed. Escape closes non-persistent
drawers. Give the drawer an aria-label or aria-labelledby.side="start" opens from the left in LTR and the right in RTL. side="end" uses the opposite edge. In QLayout, use the matching drawerStart or drawerEnd snippet. Explicit left and right stay fixed when direction changes.This drawer opens from the left side.
This drawer opens from the right side.
Click the buttons to toggle the drawers:
overlay prop, it becomes a modal drawer with a scrim and does
not affect the layout.Click the menu button to open the overlay drawer:
Notice how the content doesn't move when the drawer opens.
This drawer won't close when clicking outside it. Try it!
You need to use the button below or in the header to close it.
Click the menu button to open the persistent drawer:
Try clicking here - the drawer will stay open.
bordered prop, which helps visually
separate it from the main content.This drawer has a border on its edge.
Click the menu button to toggle the bordered drawer:
width prop. The default width
is 360px. If specified as a number, it's interpreted as pixels.This drawer has a custom width of 400px instead of the default 360px.
Click the menu button to toggle the wide drawer:
show(), hide(), and toggle(). These can be accessed by binding to the
component with bind:this.This drawer is controlled programmatically.
Control the drawer with these buttons:
This example shows a complete layout with: