Drawer

A panel that slides in from an edge and swipes away.

Installation

Examples

Default

A panel for what sits beside the work, such as settings. It slides in from the right, fills the window's height, and scrolls what doesn't fit. It's a panel docked to that side, square, with a line on the edge that faces the page, and its Sections stack with a line between each. Swipe it back the way it came, or press Escape, to close it.

demo.tsx

From the bottom

swipeDirection on the Drawer sets the side it docks to and swipes away to: right, left, down, or up. One from the bottom fills the width, as a sheet on a phone.

bottom.tsx

Anatomy

Each part's data-slot, which a theme styles, is beside it.