A tactile mobile-first swipeable card deck with drag-to-rotate physics, live SAVED / SKIP reveal stamps, stacked depth scaling, and one-tap undo — ready for travel discovery, flashcards, and product feeds.
// Drop the standalone spring-swipe-deck.html into /public/effects/spring-swipe-deck.html
// Or copy the HTML/CSS/JS tab directly into your component — zero external dependencies.
export function SpringSwipeDeckEmbed() {
return (
<div className="relative min-h-[480px] w-full overflow-hidden rounded-2xl border border-white/10">
<iframe
src="/effects/spring-swipe-deck.html"
title="Spring Swipe Card Deck"
className="h-full min-h-[480px] w-full border-0"
loading="lazy"
/>
</div>
)
}Loading single-file HTML…
Create a single-file interactive Spring Swipe Card Deck using pure HTML, CSS, and vanilla JS (zero dependencies) designed for mobile web apps, travel discovery, and EdTech flashcards. - Swipe Physics: Stack 3 visible cards with progressive translateY and scale depth. Dragging the top card via pointer events rotates it proportionally to horizontal delta, fades in rotated SAVED (green) or SKIP (rose) badges, and smoothly flings offscreen when dragged past 95px — or springs back if released early. - Controls: Bottom tactile Pass (✕), Reset/Undo (↺), and Save (♥) circular buttons with full touch-action: none mobile gesture support.
WHY THIS WORKS IN PRODUCTION
- Real pointer-drag rotation physics with spring snap-back & fling dismissal
- Dynamic SAVED / SKIP stamp opacity proportional to drag distance
- Works great for Travel discovery, EdTech flashcards, Dating & E-Commerce
- Touch-native (touch-action: none) in just 3.6 KB with zero dependencies
DROP-IN SPECS // WEB & MOBILE FIT








