Drawer
A bottom sheet component built on vaul. Slides up from the bottom with drag-to-dismiss support.
Import
import {
Drawer,
DrawerClose,
DrawerContent,
DrawerDescription,
DrawerFooter,
DrawerHeader,
DrawerTitle,
DrawerTrigger,
} from "poyraz-ui/molecules";Default
A drawer with a form inside. Drag the handle or click overlay to dismiss.
<Drawer>
<DrawerTrigger asChild>
<Button variant="outline">Open Drawer</Button>
</DrawerTrigger>
<DrawerContent>
<div className="mx-auto w-full max-w-sm">
<DrawerHeader>
<DrawerTitle>Edit Profile</DrawerTitle>
<DrawerDescription>
Make changes to your profile.
</DrawerDescription>
</DrawerHeader>
<div className="p-4 space-y-4">
<div className="space-y-2">
<Label>Name</Label>
<Input placeholder="Your name" />
</div>
</div>
<DrawerFooter>
<Button>Save changes</Button>
<DrawerClose asChild>
<Button variant="outline">Cancel</Button>
</DrawerClose>
</DrawerFooter>
</div>
</DrawerContent>
</Drawer>