Kinetic UI
Back to Introduction
Cards

Swipeable Stack Deck

A stack of physical cards that users can drag and swipe away using advanced gestures.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add swipeable-stack

Bring Tinder-style swiping mechanics to your web application. Using Framer Motion's drag API and advanced physics, users can physically grab the top card of a stack and throw it off the screen. As cards are removed, the cards underneath perfectly scale and slide up to take their place.

Live Preview

Swipeable Stack Deck
Tokyo Neon

Tokyo Neon

Japan

Alpine Lake

Alpine Lake

Switzerland

Desert Dunes

Desert Dunes

Morocco

LIKE
NOPE

Interaction:Drag the top card left or right to swipe.

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { SwipeableStack } from "@/components/creative/swipeable-stack";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { SwipeableStack } from "@/components/creative/swipeable-stack";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <SwipeableStack
        cards{/* value */}
        onSwipeRight{/* value */}
        onSwipeLeft{/* value */}
      />
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.