Drawer

A bottom sheet that can be dragged shut — the touch-first counterpart to Sheet, for a short task that should not take the person off the page.

tsx
import {
  Drawer,
  DrawerTrigger,
  DrawerContent,
  DrawerHeader,
  DrawerTitle,
  DrawerDescription,
  DrawerFooter,
  DrawerClose,
} from "@pestoui/core"

Bottom drawer

Constrain the inner column yourself: the drawer spans the viewport, and a short form reads better at a fixed measure.

Props

PropTypeDefaultDescription
open / defaultOpen / onOpenChangeboolean / boolean / (open: boolean) => void—On Drawer. Controlled or uncontrolled open state.
direction"top" | "right" | "bottom" | "left""bottom"On Drawer. The edge it slides from; the drag handle is drawn only for bottom.
dismissiblebooleantrueOn Drawer. When false, dragging, Escape and an outside press no longer close it.
autoFocusbooleantrueOn Drawer. Moves focus into the drawer as it opens, so Tab stays inside it. The underlying primitive defaults to false; this wrapper turns it on.
asChildboolean—On DrawerTrigger and DrawerClose. Hands the behaviour to the child element.

Pesto UI · 117 documented components