StealThis .dev
Pages Easy

Ticketing — Digital Ticket

A self-contained mobile digital event ticket with a perforated stub layout, photographic gradient hero, prominent date and venue, and a seat-tier color legend. It features an animated SVG-style QR code on canvas that refreshes on a security timer, a countdown to doors, and a brightness boost for scanning. Tap to flip the card for full event details, add the pass to a wallet, or open a validated transfer modal that voids your QR and reissues a fresh one.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Digital Ticket

A pocket-sized digital pass for the fictional Neon Pulse Festival. The card uses a classic perforated-stub silhouette: a photographic gradient hero with a low-stock badge sits above the seat stub, a dashed perforation line with rounded notches separates the stub from the canvas QR zone, and a tier color legend maps GA Floor, Lower, and VIP to dots. A live countdown to doors and a security timer that re-renders the QR every fifteen seconds keep the ticket feeling current.

Every control is interactive. Add to Wallet shows an optimistic loading toast then a success confirmation; Boost brightness lifts the whole screen via a CSS filter so gate scanners can read the code; and Flip for details rotates the card in 3D to reveal door times, the order number, the price paid, and entry rules. Transfer ticket opens an accessible modal (focus management, Escape to close, backdrop dismiss) that validates the recipient’s name and email-or-phone before sending and voiding your QR.

It is plain HTML, CSS, and vanilla JavaScript with no dependencies. The QR is drawn on a <canvas> with finder squares and a seeded noise fill, so it looks like a real scannable code while staying fully offline. The layout is responsive down to about 360px, respects reduced-motion preferences, and meets WCAG AA contrast.

Illustrative UI only — fictional events, not a real ticketing service.