Drawer

A panel that slides in from an edge and can be swiped away.

Installation

  1. Add the registryOnce per project
  2. Add drawer

Usage

A drawer slides up from the bottom and can be swiped away, which suits phones. For a panel without swiping, use a Sheet.

showSwipeHandle adds a grip. Keep a close button too, and always include a DrawerTitle.

Composition

Examples

Swipe direction

swipeDirection sets which way the drawer is swiped to close: down, up, left or right.

Props

The tables leave out className, style and render. Parts built on Base UI take them as its styling and composition guides describe.

Drawer

DrawerTrigger

DrawerPortal

DrawerClose

DrawerOverlay

DrawerContent