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

    235
  • AI Task List

    AI Task List

    160
  • Siri Orb

    Siri Orb

    160
  • Cursor Follow

    Cursor Follow

    154
  • Pixel Flow Field

    Pixel Flow Field

    142
  • Agent Avatar

    Agent Avatar

    130
  • Gravity Stars

    Gravity Stars

    112
  • Coverflow Carousel

    Coverflow Carousel

    95

More in Galleries

View all
  • Thumbnail image viewer

    Thumbnail image viewer

    43
  • Animated Gallery

    Animated Gallery

    1.4K
  • Hero Section 6

    Hero Section 6

    881
  • Editorial Collage Hero

    Editorial Collage Hero

    430
  • Layout Grid

    Layout Grid

    826
  • 3D Parallax Unfurling Gallery

    3D Parallax Unfurling Gallery

    981
  • Image Gallery

    Image Gallery

    90
  • File Upload

    File Upload

    18

Explore more

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