Move goal
The shadcn demo: a slip pulled up from the bottom, torn along its top edge and taped down by its grab tab. Drag the tape, flick it away, or press Escape.
A slip of paper you pull up from the bottom of the screen (or in from any edge), built on vaul. From the bottom it is torn off a pad along its top edge with a strip of tape as the grab tab; drag it, flick it away, or give it snap points.
npx shadcn@latest add @wobko/drawer第一次使用?先把 registry 加进 components.json。 如何安装
The shadcn demo: a slip pulled up from the bottom, torn along its top edge and taped down by its grab tab. Drag the tape, flick it away, or press Escape.
Give the slip resting heights: it stops a third, two thirds or all the way up, and remembers where it is. The list only scrolls at the top snap point so a drag never fights a scroll.
Pull a slip in from any edge. Only the bottom slip is torn and taped (that is where the grab tab belongs); the others are plain slips you drag toward their edge.
A dialog on wide screens and a drawer on phones, from one component. The media query is read with useSyncExternalStore, so the server renders the desktop dialog and the phone swaps in after hydration.
The slip: a Paper that is also the vaul drawer. The drag transform vaul writes lands on the sheet, its shadow and the tape together.
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| tapeKind | TapeKind | "kraft" | The grab tab's tape (bottom drawers only): kraft, masking, clear or a washi pattern. |
| tapeColor | Accent | - | The print color of a washi tape. |
| stock | StockName | "slip" | What the slip is made of. |
| edge | EdgeSpec | { top: "torn" } from the bottom, "cut" otherwise | How it is cut. |
| seed | string | number | - | Pins the hand. |
CLI 会复制进你项目的文件。
正在加载源码