04.44 · Micro-Interactions
Card Deck Swipe
Swipe the top card left or right; the next one rises. Best for quick choices.
Drag it
Drag the top card sideways and let go (or Tab to it and use the arrow keys), or press Show me.
Inside, the pile is spread apart and numbered: each waiting card is smaller. The top card turns around a point below it, and a dashed line lights once it is far enough to fly.
On the left the card vanishes when you let go, so it is hard to tell where it went. On the right it flies off the side you chose as the next one rises.
Try it
Change a setting, then drag a card or press Show me.
How far to swipe
How far to drag before letting go sends it.
How much it turns
As if held at the bottom edge.
Like and Nope fade in as you drag.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a swipeable card deck to [your stack of cards, such as profiles or products]. Pile the cards with the waiting ones behind the top one, showing as the settings choose. While dragged, the top card follows the finger and turns as the settings choose, as if held at its bottom edge, and Like or Nope stamps fade in when the settings include them. On release, send it off that side if it went far enough or was flicked; otherwise spring it back, and grow the next card into place. Use transforms and pointer events, let up-and-down scrolling pass through, and add Nope, Like and Undo buttons for keyboards. If the visitor has reduced motion turned on, fade cards out instead of throwing them. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.