Components / Shapes

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 width
112px
Punch radius
9px
Radius
12px
Line
1px

Installation

npx shadcn@latest add https://fancyborders.vercel.app/r/ticket-frame.json

The 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";
PropTypeDefault
stubReactNode

Content of the tear-off stub on the right. Required.

–
stubWidthnumber

Width of the stub, in pixels.

112
punchRadiusnumber

Radius of the bites at the top and bottom of the perforation.

9
radiusnumber

Radius of the outer corners.

12

Also accepts line, fill, color and every div attribute.