Components / component

Slide Drawer

v1.0.0 · premium

A side or bottom drawer on the native dialog element that slides in over a fading backdrop.

Slide Drawer demo

Implementation

A side or bottom drawer on the native dialog element that slides in over a fading backdrop.

Framework
React 19.3.1 with TypeScript
Motion
Native CSS and browser APIs. No GSAP required.
Available modes
build
Version
1.0.0 · published

Source code

Download source ZIP
export function DrawerSlide({ open, onClose, title, children, side = 'right', lockScroll = true, ink, paper, className }
  open: boolean;
  /** Called on Escape, a backdrop click, or an element with `data-drawer-close`. */

Quality evidence

Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .

Changelog

v1.0.0 · A side or bottom drawer on the native dialog element that slides in over a fading backdrop.

Frequently asked questions

Which edges can the drawer open from?

The right, the left and the bottom. Pass side to choose.

Does focus return when the drawer closes?

Yes. The browser returns focus to the element that opened it.