Preview

Installation

<> import.ts
import { Drawer } from "@/components/ui/drawer"

Code

<> component.tsx
import { Drawer } from "@/components/ui/drawer"

<Drawer />

API Reference

Drawer

A sliding panel from any screen edge with overlay and header.

<> import.ts
import { Drawer } from "@/components/ui/drawer"

Props

PropTypeDefaultDescription
isOpen
booleanControls visibility
onClose
() => voidCalled to close the drawer
title
stringHeader title
description
stringHeader description
children
React.ReactNodeDrawer body content
className
string""Additional CSS classes
position
"left" | "right" | "top" | "bottom""right"Slide-in side
size
"sm" | "md" | "lg" | "xl""md"Panel dimensions
showCloseButton
booleantrueShow header close button