UI Drawer
GitHubDrawer primitive with support for keeping portal content mounted.
Installation
bash
pnpm dlx shadcn@latest add @cs/ui-drawerUsage
tsx
import { Drawer, DrawerContent, DrawerTrigger } from "@/components/cs/ui-drawer"tsx
<Drawer>
<DrawerTrigger render={<button type="button">Open drawer</button>} />
<DrawerContent keepMounted>Drawer content</DrawerContent>
</Drawer>API Reference
Drawer
Drawer primitive that supports mounted portal content after closing.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| showSwipeHandle | boolean | false | - |
DrawerPortal
DrawerOverlay
DrawerSwipeHandle
DrawerTrigger
DrawerClose
DrawerContent
Props
| Name | Type | Default | Description |
|---|---|---|---|
| keepMounted | boolean | - | - |