225
A booking ticket that, once confirmed, rips along its perforation: the stub pulls open from the top, comes free and drops away with a lazy spin, and the ticket you keep slides back to centre with its torn edge intact.
akaticket·boarding pass·booking confirmation
Run this in any project set up for the shadcn CLI. It copies the Ticket Tear source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/ticket-tear.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { TicketTear } from "@/components/ticket-tear";
export default function Page() {
return <TicketTear />;
}A free React motion component in the Celebration collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Ticket Tear source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| mainrequired | ReactNode | — |
| stubrequired | ReactNode | — |
| tornrequired | boolean | — |
| onTorn | () => void | — |
| stubWidth | number | 96 |
| height | number | 168 |
| className | string | — |