A boarding-pass card that peels open along its perforation when you press and drag, revealing the itinerary stub with an animated route trace. It brings physical hospitality tactility to flight and stay check-ins on mobile web.
// Drop the standalone boarding-pass-peel.html into /public/effects/boarding-pass-peel.html
// Or copy the HTML/CSS/JS tab directly into your component — zero external dependencies.
export function BoardingPassPeelEmbed() {
return (
<div className="relative min-h-[480px] w-full overflow-hidden rounded-2xl border border-white/10">
<iframe
src="/effects/boarding-pass-peel.html"
title="Boarding Pass Peel"
className="h-full min-h-[480px] w-full border-0"
loading="lazy"
/>
</div>
)
}Loading single-file HTML…
Build a zero-dependency "Boarding Pass Peel" component for a travel/hospitality web app. Structure: a centered ticket card (max 380px wide) split into a main body and a tear-off stub by a perforated dashed divider with punched half-circle notches top and bottom. The stub sits flush, then on pointer down the user drags it leftward; it lifts with a subtle 3D rotateY (max -18deg) and a soft drop shadow, revealing a hidden itinerary panel beneath showing origin→destination, time, gate, and a thin SVG route line that draws itself with stroke-dashoffset. Mechanics: use pointer events (pointerdown/move/up) with setPointerCapture, translate the stub by clamped drag distance (0–120px), spring-snap back or fully detach with a cubic-bezier(0.22,1,0.36,1) transition. An SVG route arc with a small plane dot animates along the path via CSS @keyframes offset-path when revealed. Touch: prevent vertical scroll only during active horizontal drag using touch-action: pan-y. Palette: sky #0284c7, sunset #f97316, paper #fdfaf4, ink #1c2b33, muted #7b8f99. Accessibility: respect prefers-reduced-motion by disabling the rotateY lift and instant-revealing the itinerary. Keep it fully responsive 390px→desktop, 60fps, no libraries.
WHY THIS WORKS IN PRODUCTION
- Drag-to-peel stub with spring snap-back and detach
- SVG route line self-draws on itinerary reveal
- touch-action: pan-y preserves mobile vertical scroll
- Reduced-motion fallback instant-reveals the stub
DROP-IN SPECS // WEB & MOBILE FIT








