Flow Kit LogoFlow Kit

Card Stack

A stack of cards that stack on top of each other with a satisfying fade animation. Perfect for testimonials, notifications, or flashcards.

Examples

Default

A

Alex Rivera

CTO @ InnovateLabs

"The animation primitives provided by this library are simply outstanding. We rewrote our entire onboarding flow using the CardStack component, and user retention went up by 15% in the first week."

S

Sarah Chen

Product Designer @ Figma

"I've always struggled to get developers to implement my motion designs correctly. With Motion UI, I just point them to the docs. The physics are buttery smooth and the attention to detail is top-notch."

J

James Wilson

Indie Hacker @ ShipFast

"I built my MVP in a weekend using these components. The fact that it's just copy-paste code means I have full control, but I didn't have to waste time reinventing the wheel. Absolutely essential toolkit."

J

James Wilson

Indie Hacker @ ShipFast

"I built my MVP in a weekend using these components. The fact that it's just copy-paste code means I have full control, but I didn't have to waste time reinventing the wheel. Absolutely essential toolkit."

Showing card 1 of 4

Controlled

Monday

Team standup
Dentist appointment
Focus time

Tuesday

Morning yoga
Client call
Lunch with Sarah

Wednesday

Gym session
Sprint planning
Design review

Thursday

Morning run
1:1 with manager
Deep work

Friday

Sleep in
Weekly retro
Team lunch
Showing card 1 of 5

Click card to advance

Installation

npm install @repo/ui@latest

API Reference

CardStack

PropTypeDefaultDescription
childrenReact.ReactNodeRequiredThe card elements to display in the stack.
classNamestringundefinedAdditional CSS classes for the container.
offsetsCardOffset[][{ scale: 1, y: 0, opacity: 1 }, { scale: 0.95, y: 12, opacity: 1 }, { scale: 0.9, y: 24, opacity: 1 }]Visual offsets for stacked cards (scale, position, opacity).
maxVisibleCardsnumber3Maximum number of cards visible in the stack.
transitionTransition{ type: "spring", damping: 21, stiffness: 180 }Framer Motion transition config for animations.
exitOffsetnumber-64Y-offset in pixels when a card exits the stack.
exitBlurnumber4Blur amount in pixels applied to exiting cards.
autoAdvancebooleanfalseEnables automatic card cycling.
autoAdvanceIntervalnumber5000Time in ms between auto-advances.
pauseOnHoverbooleantruePauses auto-advance when hovering.
activeIndexnumberundefinedControlled index of the currently active card.
onIndexChange(index: number) => voidundefinedCallback fired when the active index changes.
clickablebooleantrueAllows clicking the top card to advance.
keyboardNavigablebooleantrueEnables keyboard navigation with arrow keys.

CardStackIndicator

PropTypeDefaultDescription
totalCardsnumberRequiredTotal number of cards in the stack.
activeIndexnumberRequiredIndex of the currently active card.

CardOffset Type

PropertyTypeDefaultDescription
scalenumberRequiredScale factor applied to the card (1 = 100%).
ynumberRequiredVertical offset in pixels from the top.
opacitynumberundefinedOpacity of the card (0 to 1).