logo

Rotating Cards

A cinematic, high-performance circular gallery built with Framer Motion. It features zero-react-render physics loops, smooth momentum-based dragging, mouse wheel support, and premium 3D hover effects.

Features

  • Physics-Based Momentum: Smooth starting, stopping, and "throwing" interactions.
  • Zero-Render Loop: Uses useAnimationFrame and useMotionValue for 120fps performance without React re-renders.
  • Draggable & Mouse Wheel: Multiple ways to interact with the gallery.
  • 3D Hover Effects: Cards tilt and scale with dynamic shadows on hover.
  • Infinite Auto-play: Configurable speed and direction.

Usage

Loading...

Props

PropTypeDefaultDescription
cardsRotatingCard[][]Array of card objects (id, content, background, img).
radiusnumber360The radius of the circular path.
durationnumber20Time for one full rotation in seconds.
cardWidthnumber160Width of each card.
cardHeightnumber190Height of each card.
pauseOnHoverbooleantruePause auto-play when hovering.
draggablebooleanfalseEnable mouse/touch dragging.
autoPlaybooleantrueEnable continuous rotation.
mouseWheelbooleanfalseEnable rotation via mouse wheel scroll.
reversebooleanfalseReverse the rotation direction.

RotatingCard Type

Loading...

Tip: Use Alt + / to navigate