Guide

@samline/drawer

A framework-free drawer runtime for bottom sheets, side panels and nested flows.

Drawer is a framework-free runtime for bottom sheets, side panels and nested dialogs. Create an instance, supply your panel CSS, and let the package own gestures, dismissal and modal focus.

Start building

Choose your integration

Use @samline/drawer for named ESM or CommonJS imports. Use @samline/drawer/browser for the module namespace. Plain HTML loads the separate IIFE and stylesheet; it exposes window.Drawer. DOM integrations run in the browser. The headless createDrawerController can model state without the DOM.

Read entrypoints and module formats for the loading terminology and lifecycle and state for instance ownership.

Styling and accessibility

The runtime stylesheet supplies motion and handle behavior. Your application defines panel position, dimensions, colors, accessible content and visible focus. Modal focus management and scroll locking stay in Drawer. See Accessibility and focus.

Version

This site documents @samline/drawer 5.1.2. Use this version when copying the pinned CDN examples.