ui

Drawer

A panel that slides in from the edge of the screen with swipe gestures, snap points, and nested drawer support. Built with Base UI and Tailwind CSS. Copy-paste ready.

API Reference

Installation

Usage

Position

Use the position prop on Drawer to control which edge the drawer slides in from. Defaults to "bottom".

Variants

The DrawerPopup component supports a variant prop to control its shape:

  • default (default): Rounded corners facing inward
  • inset: Adds screen-edge inset spacing on larger viewports
  • straight: No rounded corners — flush to the screen edge

Footer Variant

The DrawerFooter component supports a variant prop:

  • default: Includes a border-top, background color, and padding
  • bare: Removes the border and background for a minimal appearance

Drag bar

Pass showBar to DrawerPopup to render a visible drag handle bar.

Examples

Multiple Positions — Inset

Opens a drawer from each of the four edges (top, right, bottom, left) using the inset variant with screen-edge spacing.

Multiple Positions — Straight

Same four-edge positioning demo using the straight variant for flush, full-bleed drawers with no rounded corners.

Multi-step Nested Drawers

Chains multiple drawers as a step-by-step wizard flow, each opening on top of the previous one.

A side drawer containing a full navigation menu, the standard pattern for mobile app side navigation.

Filter & Sort Panel

A bottom or side drawer with filter checkboxes and sort controls for refining list or grid views.

Shopping Cart

A right-side drawer showing cart items, quantities, subtotal, and a checkout button.

Notification Center

A drawer listing recent notifications with timestamps and mark-as-read actions.

User Preferences & Theme Settings

A right-side straight drawer with theme switcher tiles (Light / Dark / System), a language select, and a push-notification toggle switch.

File Attachments with Upload

A bottom drawer with a drag-and-drop upload zone and an existing attachments list — individual files can be removed before confirming the selection.

Activity Log with Status Timeline

A right-side straight drawer rendering a vertical timeline of deployment and build events, each tagged with Completed, In progress, or Pending status badges.

A bottom drawer with a live-filtered FAQ accordion — typing in the search field narrows the list and individual questions expand inline.

Quick Actions Grid

A bottom drawer triggered by a contextual ellipsis button that presents an icon grid of actions (Edit, Share, Bookmark, Archive, Delete, etc.), each closing the drawer and reporting the chosen action.