shadcn.io is not affiliated with official shadcn/ui
Ticket Stub Pricing Block for React
A one-time lifetime pass for a course library drawn as a ticket: a main stub with the pass and what it opens, and a perforated tear-off stub with the price, the saving, a barcode and the claim button.
Installation
Overview
Sell a one-time offer with the look of a real ticket in this ticket stub pricing section, shown here for Matinee Courses, a course library. On wide screens the heading sits beside the ticket, so the ticket itself starts at the top of the section. One wide ticket in a solid hairline frame, with a + mark on each of the frame's corners, splits into a main stub and a narrower tear-off stub, joined by a dashed perforation with round notches cut into the card's edges where they meet. The main stub carries a Lifetime access Badge, the ticket's number in the run, the pass's name and description and a checklist of what it opens; the tear-off stub carries the total due today, the regular price struck through with its saving in an outline badge, a decorative barcode and the Shine Button to claim the ticket. On phones the stubs stack and the perforation and notches turn to run across the card. Built with Badge, Guides, Shine Button and Lucide icons, with CSS only: the notches are a mask, so they show whatever is behind the ticket. For lifetime deals, founders' offers, launch-week promotions, cohort seats and event passes.
FAQ
How do I change the price, the ticket number and the features?
Edit OFFER at the top of the file: its name, description, one-time price, regular (the regular price of the same pass), the ticket's serial and the run's total, and the call to action's cta and href. The struck price and the Save percentage are worked out from regular and price, so they stay right when you change either. FEATURES is the checklist.
How do I show the real number of tickets sold?
Pass the count from your backend instead of the fixed serial: read it where the page renders and put it in OFFER.serial, so every visitor sees the current number. When it reaches total, swap the call to action for a sold-out note. Treat the number as a display only: your checkout must still check the stock, since two buyers can load the same number.
How do I connect the button to a one-time payment?
The Claim your ticket button is a real link to OFFER.href. It is a ShineButton with render set to an a element and nativeButton={false}. Point it at a checkout for a one-time price rather than a subscription, and have your payment webhook record the sale and move the ticket count on.
How are the notches cut, and do they work on any background?
Each stub is masked: a radial-gradient mask removes a quarter circle from its two corners at the seam, and the two quarters meet as a half-circle notch. Because it's a cut and not a painted circle, the notches show whatever is behind the card, whether a plain page, a gradient or an image. Side by side the notches sit at the top and bottom of the perforation and follow it to the other side in right-to-left layouts; stacked on phones they move to the card's left and right edges, on a perforation that runs across.
How does the ticket read with a screen reader?
The decoration is hidden: the barcode, the perforation and the check icons. The ticket number is read as "Ticket 47 of 500" instead of its stamped "No. 047 / 500", and the struck price is replaced by "Regular price $599" before the Save badge, so the old price isn't read as the current one. The pass name is an h3 under the section's h2, and the features are a list.
When does a ticket layout fit better than a pricing card?
Use it for a single one-time purchase with a limited run: lifetime deals, founders' pricing, launch cohorts or event passes, where "pay once, own it" and scarcity are the pitch. For recurring plans or several tiers to compare, plain plan cards such as Minimal Single Pricing or a comparison table read better.
Related
- Pro
Early Bird Pricing
Discounts and offersFounder seats that run out: '163 of 200 claimed' at display size over a bar of forty segments, with the one founder plan, its struck regular price and its lifetime price beside the features.
- Pro
Countdown Offer Pricing
Discounts and offersA launch price on a clock: a live countdown in days, hours, minutes and seconds at display size beside the headline, over three plans for a music app, one of them discounted. A Segment Group shows one plan at a time on a phone.
- Pro
Minimal Single Plan Pricing
Single planThe quietest single plan: one card in a card with a launch price beside the struck-out regular price, one call to action and six included features, under a short centred header.
- 30Pro
Money Back Hero Pricing
Proof and guaranteesOne plan sold on its guarantee: an oversized 30-day seal, its promise written round the edge, beside the plan's price, features and call to action.
- %Pro
Seasonal Sale Pricing
Discounts and offersA seasonal sale for a stock-photo library: an oversized '−41%' stamp in the header row under an 'Autumn sale' ribbon, over three plans in shared-hairline cells with struck prices and the sale price at display size.
- Pro
All Inclusive Pricing
Single planOne price over a wall of everything it includes: 36 features as ticked chips in six ruled groups, with the price and one call to action in the header row and nothing gated or extra to buy.