Admit one
Concave corners, a bite out of both edges where the stub tears off, and a row of holes along the tear. The whole silhouette is drawn, holes and all.
A ticket with concave corners, a bite out of both edges where the stub tears off, and a row of holes along the tear. The holes are cut out of the paper, so the desk (and the shadow) show through. A body, a stub, spaced capitals in the typewriter font and a serial number in red.
npx shadcn@latest add @wobko/ticket第一次使用?先把 registry 加进 components.json。 如何安装
Concave corners, a bite out of both edges where the stub tears off, and a row of holes along the tear. The whole silhouette is drawn, holes and all.
Kraft, cream, cinema yellow and tram-ticket pink. The stub can be at the start, wider, or not there; a punched hole says it has been used.
A ticket is an ordinary positioned box: tape and stamps go on it with plain className. Its shadow follows the notches and the holes.
A real list: tickets with an action, a status, and a punched hole once used. The state lives in your app; the ticket only shows it.
A flex row. Its whole silhouette is one drawn sheet, tilted and shadowed as one; the content on it is real DOM. Until it is measured (or given `size`) it wears a plain card.
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| stock | StockName | "kraft" | What it is printed on: kraft, index-card (cream), sticky-yellow (a cinema ticket), sticky-pink ... |
| stub | "end" | "start" | "none" | "end" | Where the tear-off stub is. Mirrors in right-to-left layouts. |
| stubWidth | number | 88 | Width of the stub in px; the tear line sits that far from the edge. |
| punched | boolean | false | A hole punched through the body, at the end of the reading line beside the tear (the words start at the other side): the ticket has been used. |
| tilt / seed / size | boolean | number / string | number / [w, h] | - | A seeded turn under 1.2 degrees (or degrees, or false); pins the hand; the box in px for server-rendered drawings. |
CLI 会复制进你项目的文件。
正在加载源码