Sajad Entesari

Photo Deck

Cards 80

About

A stack of photo prints you can drag, flick or step through with the arrows and keyboard. The top print flies off with a tilt, the previous one flies back in from the left, the counter rolls like an odometer and the caption hands over in sequence. Pass your own photos, titles and notes.

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

Code

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

Usage.tsx

import { PhotoDeck } from "@/components/ui/photo-deck"

const IMG = "https://cdn.jsdelivr.net/gh/rm-sjent/21st-assets@v1/img/"

const photos = [
  { src: `${IMG}deck-kyoto.jpg`, title: "Lantern light after the rain", place: "Gion, Kyoto", note: "Go at dusk on a wet evening, when the stone holds every lantern twice." },
  { src: `${IMG}deck-lisbon.jpg`, title: "The tram that climbs Alfama", place: "Lisbon, Portugal", note: "Ride line 28 before nine and you get the street, and the light, to yourself." },
  { src: `${IMG}deck-lofoten.jpg`, title: "Red cabins under black peaks", place: "Reine, Lofoten", note: "Arctic light lasts for hours here, so there is no rush to find the shot." },
  { src: `${IMG}deck-cappadocia.jpg`, title: "Two hundred balloons at sunrise", place: "Göreme, Cappadocia", note: "Watch from the ridge above town rather than the basket, and bring a coat." },
  { src: `${IMG}deck-atlas.jpg`, title: "A village built into the hill", place: "High Atlas, Morocco", note: "The road up is slow, so stay the night and catch the snow line at first light." },
  { src: `${IMG}deck-patagonia.jpg`, title: "Granite towers over milky water", place: "Torres del Paine, Chile", note: "The wind drops for an hour after dawn. That hour is the whole trip." },
]

export default function PhotoDeckDemo() {
  return (
    <div className="flex min-h-[720px] w-full items-center justify-center bg-white p-6 md:p-12" style={{ fontFamily: "Geist, ui-sans-serif, system-ui, sans-serif" }}>
      <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@300..600&family=Newsreader:ital,opsz,wght@0,6..72,300..500;1,6..72,300..400&display=swap" precedence="default" />
      <div className="w-full max-w-[1200px]">
        <PhotoDeck photos={photos} />
      </div>
    </div>
  )
}

Dependencies

More by Sajad Entesari

View all
  • Slat Shutter Hero

    Slat Shutter Hero

    125
  • Fan Gallery

    Fan Gallery

    84
  • Scattered About

    Scattered About

    79
  • Sector Wheel

    Sector Wheel

    75
  • Scroll Fill Headline

    Scroll Fill Headline

    67
  • Timeline Scrubber

    Timeline Scrubber

    58
  • Feature UI Row

    Feature UI Row

    48
  • Morph Island

    Morph Island

    40

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.4K
  • Stats cards with links

    Stats cards with links

    46
  • Statistics Card 7

    Statistics Card 7

    342
  • Statistics Card 2

    Statistics Card 2

    322
  • Card Studio

    Card Studio

    37
  • Card

    Card

    65
  • Admin Dashboard Cards

    Admin Dashboard Cards

    44
  • Astryx Clickable Card

    Astryx Clickable Card

    1