Swipeable Card

PRO

Touch-friendly swipeable card component with gesture support, customizable actions, and smooth animations for mobile-first interactions and card-based interfaces.

Pro Features

Unlock advanced capabilities with the Pro version

Built-in LIKE / NOPE Indicators

Green LIKE and red NOPE overlays fade in automatically as you drag, driven by distance relative to the threshold.

Spring-Physics Motion

Cards rotate while dragging, animate off-screen on a completed swipe, and spring back smoothly when released early.

Touch & Pointer Support

Works with both touch and mouse drag, with grab cursors and text-selection disabled for a native feel.

Composable Card Stacks

Drops cleanly into Tinder-style stacks — control z-index and offsets from your own layout.

Flexible Layout

Wraps any content and accepts custom dimensions via className and style.

Installation

Install via CLI

npx @moontra/moonui-cli add swipeable-card

Usage

Pro Required
LIKE
NOPE

Swipeable Card

Drag right for a green LIKE badge, left for a red NOPE badge.

Swipe past ~100px to trigger

Examples

Built-in LIKE / NOPE Indicators

PRO

The component renders directional overlays automatically: dragging right past the threshold fades in a green LIKE badge (top-right), dragging left fades in a red NOPE badge (top-left). The card also rotates as it moves, and springs back if you release before the threshold.

Pro Required
LIKE
NOPE

Swipeable Card

Drag right for a green LIKE badge, left for a red NOPE badge.

Swipe past ~100px to trigger

Card with Action Buttons

PRO

Pair swipe gestures with focusable buttons so the same actions stay reachable without dragging. Toggling `disabled` turns the drag gesture off while those buttons keep calling the same handlers — the accessible fallback path.

Pro Required
LIKE
NOPE

Premium Content

Swipe right to like, left to pass

0 likes0 stars0 passes

Tinder-Style Card Stack

PRO

Render a stack where only the top card is swipeable; background cards are static layers positioned behind it. Note: keep transforms in your own layout — passing a transform through style would override the drag animation, so the top card only sets zIndex.

Pro Required

Mike Chen

32 years old

Emma Davis

26 years old

LIKE
NOPE

Sarah Johnson

28 years old

Love hiking and coffee

2 miles awayActive today

Notification Cards

PRO

Swipeable notifications with a smaller threshold (80px) for quick dismissal in either direction.

Pro Required
LIKE
NOPE

New comment

John replied to your post

2m
LIKE
NOPE

Bookmark saved

Your article was bookmarked

5m
LIKE
NOPE

System update

New features available

1h

Custom Threshold and Feedback

PRO

Adjust how far the user must drag before a swipe registers. The LIKE / NOPE indicators fade in across the same distance, so a larger threshold reveals them more gradually.

Pro Required
LIKE
NOPE

Custom Threshold

Swipe 100px to trigger — indicators fade in over that distance