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/ticketFirst time here? Add the registry to components.json first. How to install
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.
| Prop | Type | Default | Description |
|---|---|---|---|
| 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. |
The files the CLI copies into your project.
Loading the source