Drawer
A panel from the bottom, made for thumbs — drag it down to close (vaul).
Preview
Usage
tsx
import { Drawer, DrawerTrigger, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerFooter, DrawerClose, Button } from "zostel-ui";
<Drawer>
<DrawerTrigger asChild><Button variant="outline">Your stay</Button></DrawerTrigger>
<DrawerContent>
<DrawerHeader>
<DrawerTitle>Your stay</DrawerTitle>
<DrawerDescription>Check it, then confirm.</DrawerDescription>
</DrawerHeader>
…
<DrawerFooter>
<Button>Confirm</Button>
<DrawerClose asChild><Button variant="outline">Not now</Button></DrawerClose>
</DrawerFooter>
</DrawerContent>
</Drawer>Drawer
| Prop | Type | Default | Description |
|---|---|---|---|
open / onOpenChange | boolean / (open) => void | — | Controlled state. |
shouldScaleBackground | boolean | true | Scale the page behind while open. |
… | vaul DrawerProps | — | snapPoints, dismissible, direction… |
open / onOpenChangeType:
boolean / (open) => voidDefault: —
Controlled state.
shouldScaleBackgroundType:
booleanDefault:
trueScale the page behind while open.
…Type:
vaul DrawerPropsDefault: —
snapPoints, dismissible, direction…