react-cards-pro

The fluid, physics-based card engine for React.

npm i react-cards-pro
Big Buck Bunny
Elephants Dream
For Bigger Blazes
For Bigger Blazes

Visuals

3
5
0.05
-10

Physics

15

Auto-swipe

Why We're Better

True Physics

Spring-based interactions with framer-motion, not just CSS transitions. Native-feel drag and release.

Smart Audio

Persistent volume state across the entire feed. Unmute once, all subsequent cards honor it.

Liquid Depth

Background cards react continuously to gestures. They scale and move as you drag the top card.

Props API

PropTypeDefaultDescription
dataCardItem[]Array of card items (id, image, video?, title?).
stackDepthnumber3Max cards rendered in DOM (active + next N−1).
scaleRationumber0.05Scale step between stacked cards.
yOffsetnumber-10Vertical offset (px) per stack level.
cardMaxWidthnumber380Max width (px) of the card stack.
messyStackbooleantrueRandom rotation on background cards.
scatterRandomnessnumber5Max rotation (deg) for messy stack.
animateRotationbooleantrueMap drag to rotation.
animateScalebooleantrueMap drag to scale.
swipeThresholdnumber150Min drag (px) to trigger swipe.
maxRotationnumber15Max rotation (deg) at threshold.
endlessbooleanfalseRecycle swiped cards to end so deck never empties.
autoSwipebooleanfalseSlideshow mode.
autoSwipeDirection'alternating' | 'right' | 'left''alternating'Direction for auto-swipe.
autoSwipeIntervalnumber4000Interval (ms) between auto-swipes.
disableAudioControlsbooleanfalseHide custom audio overlay on video cards.
hideMuteButtonbooleanfalseWhen true, hides the mute button on video cards.
initialMutedbooleantrueVideos start muted.
onSwipe(direction: string, item: CardItem) => voidCalled when a card is swiped.
onClick(item: CardItem) => voidCalled when the active card is clicked/tapped (minimal drag, no swipe).
renderCard(item, { depth, isActive }) => ReactNodeCustom render per card; overrides image/video when provided.