Dinachi

Drawer

A panel that slides in from the edge of the screen for focused workflows.

View Source

#Installation

npx @dinachi/cli@latest add drawer

#Usage

tsx
import {
  Drawer,
  DrawerTrigger,
  DrawerPortal,
  DrawerBackdrop,
  DrawerContent,
  DrawerHeader,
  DrawerTitle,
  DrawerDescription,
  DrawerFooter,
  DrawerClose,
  DrawerSwipeArea,
} from "@/components/ui/drawer"

#Examples

#API Reference

PropTypeDefaultDescription
openbooleanThe controlled open state of the drawer root.
defaultOpenbooleanfalseThe initial open state for uncontrolled usage.
onOpenChange(open: boolean) => voidCallback fired when the drawer open state changes.
DrawerContent.side'top' | 'right' | 'bottom' | 'left''right'Controls which side the drawer enters from.