Ballmac UI home

Drawer

A swipe-to-dismiss panel from any edge on Vaul, with grab handle, header, scrollable body and footer, drag-safe inner content and reduced-motion handling.

3 items

$189.00

Installation

$ pnpm dlx shadcn@latest add @ballmac/drawer

Usage

import { Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerBody, DrawerFooter, DrawerTitle, DrawerDescription } from "@/components/ballmac/drawer"

The full example is in the Code tab above.

Examples

Four directions

API reference

PropTypeDefault
handle

Show the grab handle. On by default for bottom drawers.

boolean—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Tab / Shift+TabCycles focus inside the drawer
EscapeCloses and returns focus to the trigger
Drag / swipeDismisses by gesture

Use with AI

Bottom drawers suit mobile actions; use direction left or right for side panels. Compose DrawerHeader, DrawerBody and DrawerFooter. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Drawer (@ballmac/drawer) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Mobile-first confirmations and pickers
  • Panels users may want to flick away

Not for

  • Desktop settings panels; use sheet
  • Critical confirmations; use alert-dialog

Registry JSON: https://ui.ballmac.com/r/drawer.json

Credits

Based on shadcn/ui Drawer, adapted by Ballmac. Free to use in personal and commercial projects.

Registry
shadcn/utils