Binhlaig logoBinhlaig UI
Components/Drawer
Binhlaig UI Component

Drawer

A gesture-enabled panel that slides from an edge of the screen for menus, filters, forms and details.

Installation

Install Drawer in your project.

Terminal
npx binhlaig-ui@latest add drawer

For project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.

View Installation Guide →Update or Overwrite →

Import

Import Drawer primitives from your UI directory.

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

Bottom Drawer

The default drawer opens from the bottom and supports swipe-to-dismiss.

Side Drawers

Match the drawer side with the swipe direction used to dismiss it.

Form Drawer

Use Drawer for compact mobile-friendly forms.

Controlled State

Control the drawer with React state.

API Reference

Main components and custom props available in the Binhlaig UI Drawer.

ComponentPurpose
DrawerControls state and swipe behavior.
DrawerTriggerOpens the drawer.
DrawerContentRenders popup, overlay and viewport.
DrawerHeaderGroups title and description.
DrawerTitleAccessible drawer title.
DrawerDescriptionAccessible supporting text.
DrawerBodyScrollable selectable content area.
DrawerFooterAligns drawer actions.
DrawerCloseCloses the drawer.
DrawerContent propValuesDefault
sidetop, right, bottom, leftbottom
showHandlebooleantop/bottom only
showCloseButtonbooleanfalse