Ticket Frame
A ticket with rounded corners, a perforated line and a tear-off stub.
ROW C · SEAT 14
Evening show
ADMIT
01
Customize
Stub width112px
Punch radius9px
Radius12px
Line1px
Installation
npx shadcn@latest add https://fancyborders.vercel.app/r/ticket-frame.jsonThe CLI copies the component into your project, adds anything it is built on, and writes its CSS into your global stylesheet. New to the CLI? See Installation.
Good to know
- Use a drop-shadow filter rather than box-shadow for a shadow that follows the bites in every browser.
API reference
TicketFrame
tsx
import { TicketFrame } from "@/components/ticket-frame";| Prop | Type | Default |
|---|---|---|
| stub | ReactNodeContent of the tear-off stub on the right. Required. | – |
| stubWidth | numberWidth of the stub, in pixels. | 112 |
| punchRadius | numberRadius of the bites at the top and bottom of the perforation. | 9 |
| radius | numberRadius of the outer corners. | 12 |
Also accepts line, fill, color and every div attribute.