Edu Calvo

Photo Stack

Galleries 1

About

A draggable deck of stacked photo cards where dragging or tapping the top card sends it to the back to reveal the next one, with spring animation and reduced-motion support.

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

Code

How Photo Stack is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import PhotoStack from "@/components/ui/photo-stack";

export default function PhotoStackDemo() {
  const photos = [
    {
      id: "1",
      src: "https://cdn.21st.dev/assets/localized/0d88a3e03ee7bbd2daf4abb51bebdf44d0f70a9517231732bf0c03970be41de7.jpg",
      alt: "Maya Solis",
      name: "Maya Solis",
      role: "Product designer",
    },
    {
      id: "2",
      src: "https://cdn.21st.dev/assets/localized/3e5ffb7fa24ee4cee53c87faf86293579a36776ff2121320df6bd2c26ccbc7e6.jpg",
      alt: "Luca Moretti",
      name: "Luca Moretti",
      role: "Support lead",
    },
    {
      id: "3",
      src: "https://cdn.21st.dev/assets/localized/8faa3ba619fbdaa73718ddcbf954853888b0e3fb3b9ea1914849e005f7a66022.jpg",
      alt: "Sasha Kim",
      name: "Sasha Kim",
      role: "Staff engineer",
    },
  ];

  return (
    <div className="flex h-screen w-full items-center justify-center">
      <PhotoStack photos={photos} />
    </div>
  );
}

Dependencies

More by Edu Calvo

View all
  • Scrollable Card Stack

    Scrollable Card Stack

    240
  • AI Task List

    AI Task List

    167
  • Siri Orb

    Siri Orb

    164
  • Pixel Flow Field

    Pixel Flow Field

    157
  • Cursor Follow

    Cursor Follow

    155
  • Agent Avatar

    Agent Avatar

    136
  • Gravity Stars

    Gravity Stars

    124
  • Coverflow Carousel

    Coverflow Carousel

    110

More in Galleries

View all
  • Animated Gallery

    Animated Gallery

    1.5K
  • Editorial Collage Hero

    Editorial Collage Hero

    458
  • Image Gallery

    Image Gallery

    1.4K
  • Thumbnail image viewer

    Thumbnail image viewer

    64
  • Elastic Gallery

    Elastic Gallery

    958
  • 3D Parallax Unfurling Gallery

    3D Parallax Unfurling Gallery

    1K
  • Img Sphere

    Img Sphere

    2.1K
  • Shared Element Gallery

    Shared Element Gallery

    446

Explore more

Part of SmoothUI — browse the full library on 21st.dev.