Skip to content
Onycx-ui
ESC

Stacking Cards

Show a process in sticky cards. As each card slides into place, the previous card tilts back.

Dependencies
gsap
Size
320 lines
Controls
10 controls

Installation

CLI · shadcn registry

npx shadcn@latest add https://ui.onycx.dev/r/stacking-cards.json

1 · Dependencies

npm install gsap

2 · Copy the source

components/onycx/stacking-cards.tsx

Requires React 19 and Tailwind CSS v4. Copy the source from the stacking-cards.tsx tab after tweaking: your values are baked in as the new defaults. Exported image examples use portable sample artwork. Replace it with your own media as needed.

Props

PropTypeDefaultDescription
itemsStackingCard[]—{ label, title, body, detail?, image, imageAlt? } per card.
eyebrow / notestring"05 / A shared journey" / "Good things take a little consideration."Top row: dotted eyebrow and a muted note.
heading / headingAccentstring—Uppercase heading lines ("\n" breaks) and a serif last line at 0.78em.
introstring—Muted paragraph beside the heading. Empty hides it.
top / endOffsetnumber110 / 130Sticky offset, and the viewport offset where the next card finishes covering.
scaleTo / tilt / scrubnumber0.965 / -2 / 0.7How a covered card recedes and how tightly it follows scroll.
background / card / accentstring"#e3ebee" / "#f8fafb" / "#354b60"Section, card surface and step number colours.
classNamestring—Extra classes on the section.