Docs / Components / Stacked Image Cards

Stacked Image Cards

A stack of image cards that smoothly unstack and flatten horizontally side-by-side on section hover with fluid spring animation dynamics.

Abstract Fluid Art 1
Neon Cyberpunk Art 2
Prismatic Wave Art 3
Quantum Prism Art 4

Dependencies

Install the following dependencies to use this component:

1npm install framer-motion clsx tailwind-merge

Installation

Run the following command in your terminal to add the component to your project:

1npx rankflow-ui@latest add stacked-image-cards

Props Reference

PropTypeDefaultDescription
itemsStackedImageCardItem[]DEFAULT_ITEMSArray of image card objects containing id, src, alt, title, subtitle, and badge.
cardWidthnumber200Width of individual cards in pixels.
cardHeightnumber280Height of individual cards in pixels.
rotationSpreadnumber14Rotation spread angle in degrees when stacked.
flattenGapnumber16Horizontal gap between cards when flattened on hover.
hideUntilHoverbooleanfalseWhether the card stack is hidden until container section is hovered.
staggerDelaynumber0.035Stagger delay between cards during spring animation.
classNamestring''Additional container CSS classes.