DHxWhy

Domino Scroll Image Gallery

Galleries 152

About

Scroll-driven image gallery for React and Tailwind CSS (shadcn/ui): tall photo cards topple like dominoes as you scroll. It is built to reward scrolling: every scroll step knocks the next card over, turning a long collection into a satisfying chain reaction that keeps people moving to the end. Cards lie back in 3D perspective and each swings up flat toward the viewer with a gravity curve and a small bounce, the next starting as the previous passes half-way; scroll back and they fall again in reverse. Idle autoplay, a progress prop to drive it from anywhere, reduced-motion fallback, no dependencies. Use it for lookbooks, fashion and editorial galleries, campaign pages and portfolios.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Domino Scroll Image Gallery to your project and fits it to your theme.

Code

How Domino Scroll Image Gallery is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { DominoGallery } from "@/components/ui/domino-gallery";
import type { DominoItem } from "@/components/ui/domino-gallery";

const settings = {
  autoplay: true,
  standAngle: 94,
  cardWidth: 220,
  cardHeight: 590,
};

const PHOTOS = [
  { id: "photo-1662532577856-e8ee8b138a8b", title: "Linen & light" },
  { id: "photo-1715541448446-3369e1cc0ee9", title: "Studio noir" },
  { id: "photo-1515886657613-9f3515b0c78f", title: "Crosswalk" },
  { id: "photo-1580478491436-fd6a937acc9e", title: "Red thread" },
  { id: "photo-1768696083080-15d4218ce844", title: "Soft focus" }
];

const ITEMS: DominoItem[] = PHOTOS.map(({ id, title }) => ({
  src: `https://images.unsplash.com/${id}?w=440&h=1180&fit=crop&q=80&auto=format`,
  alt: title,
  title,
}));

const CCGATHER_URL = "https://ccgather.com/?utm_source=21st&utm_medium=component&utm_campaign=domino_gallery";

export default function Demo(props: Partial<typeof settings>) {
  const s = { ...settings, ...props };
  return (
    <div className="w-full bg-background text-foreground">
      <header className="mx-auto flex max-w-3xl flex-col items-center gap-2 px-6 pt-16 pb-6 text-center">
        <h2 className="text-lg font-semibold">Scroll to topple</h2>
        <p className="text-sm text-muted-foreground">Cards stand like dominoes and fall one after another as you scroll; scroll back up and they rise.</p>
      </header>
      <DominoGallery items={ITEMS} autoplay={s.autoplay} standAngle={s.standAngle} cardWidth={s.cardWidth} cardHeight={s.cardHeight} />
      <footer className="mx-auto max-w-3xl px-6 pb-16 pt-6 text-center text-xs text-muted-foreground">
        Fashion gallery from the{" "}
        <a href={CCGATHER_URL} target="_blank" rel="noreferrer" className="underline underline-offset-4 transition-colors hover:text-foreground">
          CCgather
        </a>{" "}
        team
      </footer>
    </div>
  );
}

More by DHxWhy

View all
  • Product Rail Gallery – Fashion Store Hero Section

    Product Rail Gallery – Fashion Store Hero Section

    3.1K
  • Sushi Conveyor Belt Menu – Restaurant Hero Section

    Sushi Conveyor Belt Menu – Restaurant Hero Section

    1.4K
  • Team Lanyard Rail – Meet the Team Section with Flip Badges

    Team Lanyard Rail – Meet the Team Section with Flip Badges

    1.4K
  • Skateboard Deck Rail Gallery – Skate Shop Hero Section

    Skateboard Deck Rail Gallery – Skate Shop Hero Section

    738
  • Picture Rail Image Gallery – Art Print Shop Hero Section

    Picture Rail Image Gallery – Art Print Shop Hero Section

    535
  • Sun Moon Dark Mode Theme Toggle

    Sun Moon Dark Mode Theme Toggle

    407
  • World Testimonials Globe – Social Proof Hero Section

    World Testimonials Globe – Social Proof Hero Section

    387
  • Pendant Lamp Rail Gallery – Lighting Store Hero Section

    Pendant Lamp Rail Gallery – Lighting Store Hero Section

    350

More in Galleries

View all
  • Scattered About

    Scattered About

    14
  • Animated Gallery

    Animated Gallery

    1.5K
  • Photo Deck

    Photo Deck

    4
  • Gallery Component

    Gallery Component

    5
  • Editorial Collage Hero

    Editorial Collage Hero

    507
  • Elastic Gallery

    Elastic Gallery

    1.1K
  • Image Gallery

    Image Gallery

    130
  • Folded Card

    Folded Card

    42