Presenting Sillybits Pro - Beautifully crafted templates to create stunning landing pages in no time.
Docs
Scroll Stack Cards

Scroll Stack Cards

PreviousNext

A scroll-driven 3D stacking card animation where each card scales and reveals dynamically using motion effects.

Desert Mirage

Discover golden dunes and starlit skies in the heart of the Arabian desert.

Desert Mirage

Tropical Escape

Experience the crystal-clear waters and white sands of the Maldives — your private paradise awaits.

Tropical Escape

Mountain Adventure

Conquer breathtaking peaks and lose yourself in nature’s raw beauty high in the Himalayas.

Mountain Adventure

European Escape

Wander through cobblestone streets, ancient castles, and cozy cafés across Europe.

European Escape

Forest Retreat

Reconnect with nature in misty pine forests surrounded by peace and birdsong.

Forest Retreat

Installation

Examples

Scroll Stack Cards

Desert Mirage

Discover golden dunes and starlit skies in the heart of the Arabian desert.

Desert Mirage

Tropical Escape

Experience the crystal-clear waters and white sands of the Maldives — your private paradise awaits.

Tropical Escape

Mountain Adventure

Conquer breathtaking peaks and lose yourself in nature’s raw beauty high in the Himalayas.

Mountain Adventure

European Escape

Wander through cobblestone streets, ancient castles, and cozy cafés across Europe.

European Escape

Forest Retreat

Reconnect with nature in misty pine forests surrounded by peace and birdsong.

Forest Retreat

Usage

import { ScrollStackCards } from "@/components/sillybitsui/scroll-stack-cards";
const items: Item[] = [
  {
    title: "Desert Mirage",
    description:
      "Discover golden dunes and starlit skies in the heart of the Arabian desert.",
    imageSrc:
      "https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg",
    color: "#F59E0B",
  },
  {
    title: "Tropical Escape",
    description:
      "Experience the crystal-clear waters and white sands of the Maldives — your private paradise awaits.",
    imageSrc:
      "https://images.pexels.com/photos/1450353/pexels-photo-1450353.jpeg",
    color: "#3B82F6",
  },
  {
    title: "Mountain Adventure",
    description:
      "Conquer breathtaking peaks and lose yourself in nature’s raw beauty high in the Himalayas.",
    imageSrc:
      "https://images.pexels.com/photos/674010/pexels-photo-674010.jpeg",
    color: "#10B981",
  },
 
  {
    title: "European Escape",
    description:
      "Wander through cobblestone streets, ancient castles, and cozy cafés across Europe.",
    imageSrc:
      "https://images.pexels.com/photos/460672/pexels-photo-460672.jpeg",
    color: "#8B5CF6",
  },
  {
    title: "Forest Retreat",
    description:
      "Reconnect with nature in misty pine forests surrounded by peace and birdsong.",
    imageSrc:
      "https://images.pexels.com/photos/1179229/pexels-photo-1179229.jpeg",
    color: "#065F46",
  },
];
<ScrollStackCards items={items} />;

Props

PropTypeDefaultDescription
itemsItem[][]Array of card objects to display
titlestringTitle for each card
descriptionstringDescription text for each card
imageSrcstringImage URL for each card background
color`#${string}`Background color for each card
mainContainerRefRef<HTMLDivElement>undefinedReference to a scrollable container for controlling animation behavior

Notes

  • The component uses useScroll from motion/react to track scroll position.
  • The mainContainerRef is passed to both the parent and each card to synchronize scrolling behavior.
  • If you remove the mainContainerRef prop, each useScroll hook will default to using the viewport as its container.
  • This means that the animations will trigger based on the page scroll instead of the scrollable container.