Drawer
On this page
On this page
Overview
A drawer is a panel that slides in from the edge of its container, providing supplementary content or navigation without leaving the current page.
Edit element properties
import '@rhds/elements/rh-drawer/rh-drawer.js';
<rh-drawer open="">
<div slot="header">Header</div>
<div slot="body">Body</div>
<div slot="footer">Footer</div>
<div>
<h3>Main Content</h3>
<p>The default auto variant displays as inline at wide container widths and switches to
overlay below 992px.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
</rh-drawer>
import { Drawer } from "@rhds/elements/react/rh-drawer/rh-drawer.js";
// NOTE: React 19+ does not require these wrapper imports.
// You can use the custom elements directly as-is.
export const Demo = () => (
<Drawer open>
<div slot="header">Header</div>
<div slot="body">Body</div>
<div slot="footer">Footer</div>
<div>
<h3>Main Content</h3>
<p>The default auto variant displays as inline at wide container widths and switches to
overlay below 992px.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
</Drawer>
);
Controls the layout behavior of the drawer.
Which side the panel appears on.
Whether the drawer panel is open.
Optional ID of the external trigger element.
Adds a fullscreen toggle button to the panel actions.
Controls the panel edge interaction.
collapsible: adds a collapse/expand toggle button (default for overlay/inline)resizable: adds a drag bar for manual resizing Overlay and inline variants default tocollapsiblewhen not set. Fixed variant ignorescollapsible.
When set, persists open/closed state and panel width to sessionStorage under this key.
Status
What do these mean?
- Figma library:
-
In Progress - RH Elements:
-
In Progress - RH Shared Libs:
-
In Progress
When to use
Status checklist
| Property | Status | Meaning |
|---|---|---|
| Figma library |
|
Component is being designed in Figma |
| RH Elements |
|
Component is being developed for RH Elements |
| RH Shared Libs |
|
Component is being developed for RH Shared Libs |
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.