Drawer
FREEPanel that slides in from any edge with spring motion and can be dragged closed.
Installation
Terminal
npx @bloxa/cli add drawer
# or: npx shadcn@latest add @bloxa/drawerPackages installed automatically: motion, radix-ui
Examples
Four sides
Top and bottom close by dragging the handle; side drawers by dragging the panel.
Filter panel
API reference
Every component also accepts the props of the element it renders.
DrawerContent
Drawer has the same API as Dialog.
| Prop | Type | Default | Description |
|---|---|---|---|
| side | "top" | "right" | "bottom" | "left" | "right" | Edge it slides in from. |
| size | string | "24rem" | Width of left/right drawers. |
| swipeToClose | boolean | true | Drag to close. |
| showClose | boolean | true | × button in the corner. |