Drawer
A panel that slides in from an edge of the screen, the right by default, for work that sits beside the page: its header at the top and its footer at the foot.
Usage
Examples
Sizes
size caps the width of a drawer on the left or the right from 640px: sm 320px, base 384px (the default) or lg 448px, three quarters of a phone's screen at each; on the top or the bottom, where it grows with its content at base, sm holds it to half the screen and lg opens it at least that tall.
Side
side picks the edge the drawer slides in from: top, right (the default), bottom or left.
Layout
layout="docked" paints the drawer like a docked Sidebar, on the sidebar ground with a line on its inner edge and no shadow, where floating, the default, lifts it on the popover surface.
Show close button
showCloseButton={false} takes the close button out of the corner, where it shows by default, leaving Escape and a click outside to close the drawer.
Scrollable
scrollable={false} stops the drawer scrolling as one, so a bordered DrawerHeader and DrawerFooter stay in place around a ScrollArea of its own; by default everything scrolls together.
Modal
modal={false} draws no overlay and leaves the page beside the drawer live, where by default the drawer is modal and the page inert.
API Reference
It takes the props of Radix Dialog.Root.