structyl

Drawer

stable

A bottom-anchored sheet, ideal for mobile.

Basic usage

Examples

With footer actions

A confirmation drawer with primary and cancel actions in the footer.

Mobile action drawer

Drawer is a bottom sheet variant for dense mobile workflows.

Features

  • Drag-handle affordance.
  • Slides up from the bottom.

Installation

bash
pnpm dlx structyl add drawer

API Reference

Drawer.Root

Contains all drawer parts (bottom sheet).

PropTypeDefault
openboolean

Controlled open state.

onOpenChange(open: boolean) => void

Called when open state changes.

Drawer.Trigger

Opens the drawer.

PropTypeDefault
asChildboolean

Merge props onto the immediate child instead of rendering a default element.

false

Drawer.Content

The bottom-anchored panel.

PropTypeDefault
classNamestring

Additional Tailwind classes, merged with the component defaults.

Drawer | structyl