Utility
AI
Terminal
drawer-demo
No opentui live preview is registered for this example yet.
Installation
pnpm dlx shadcn@latest add @termcn/drawer
Usage
import { Drawer } from "@/components/ui/drawer";<Drawer
isOpen={true}
edge="right"
title="Details"
width={40}
onClose={() => close()}
>
<Text>Name: my-project</Text>
<Text>Status: active</Text>
</Drawer>API Reference
Drawer
| Prop | Type | Default |
|---|---|---|
isOpen | boolean | false |
edge | "left" | "right" | "top" | "bottom" | "right" |
title | string | undefined |
children | ReactNode | required |
onClose | () => void | undefined |
width | number | 40 |
height | number | 10 |