Skip to content

Ticket Card

Textured paper, die-cut notches, and a perforated stub with a subtle pointer tilt.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import TicketCard from "./TicketCard";
export default function Example() {
return (
<TicketCard
children={"THE LISTENING\nROOM"}
stub={"ADMIT\nONE"}
color={"#e9dac4"}
stubColor={"#d0b693"}
inkColor={"#35281e"}
notchSize={14}
interactive={true}
style={{
"fontSize": 32,
"fontWeight": 600,
"letterSpacing": "-.05em",
"whiteSpace": "pre-line",
"lineHeight": 1.2,
"minHeight": 220
}}
/>
);
}

Using Ticket Card

Place the main content in children and the detachable-style side content in stub. colour props let each area use its own paper treatment.

notchSize controls the cut-outs along the perforation. Set interactive to false when the ticket should remain at a fixed angle.

Props

NameTypeRequiredDefaultDescription
childrenReactNodeNoundefinedMain ticket content; accepts any React node.
stubReactNodeNoundefinedContent of the detachable-looking stub; accepts any React node.
colorstringNo"#e9dac4"Main paper colour.
stubColorstringNo"#d4b995"Stub paper colour.
inkColorstringNo"#30251f"Inherited text colour.
notchSizenumberNo14Radius of the physical cutouts in pixels.
interactivebooleanNotrueEnable a small pointer-driven perspective tilt.
classNamestringNo""Additional CSS classes merged with the component styles.
styleCSSPropertiesNoundefinedInline styles for sizing, typography, and visual overrides.

Related components

A paper flap lifts in 3D as a message slides out of its envelope.

A lightly textured receipt pairs precise item rows with a torn paper edge.

A suspended badge swings naturally after you drag and release its handle.

Fine metallic grooves catch a shifting iridescent pointer highlight.