About
Photo cards fanned on an arc that you can drag, flick, tap or step with arrows and keys. The fan sizes itself to the screen so every visible card fits with a gap, loops without a seam, autoplays and pauses on hover. The centre card's name and tags sit underneath.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Fan Gallery to your project and fits it to your theme.
Code
How Fan Gallery is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { FanGallery } from "@/components/ui/fan-gallery"
const IMG = "https://cdn.jsdelivr.net/gh/rm-sjent/21st-assets@v1/img/"
const cities = [
{ src: `${IMG}city-lisbon.jpg`, label: "Lisbon", tags: ["Relocation", "Family moves"] },
{ src: `${IMG}city-copenhagen.jpg`, label: "Copenhagen", tags: ["Hiring abroad", "Team setup"] },
{ src: `${IMG}city-tokyo.jpg`, label: "Tokyo", tags: ["New office", "Local entity", "Payroll"] },
{ src: `${IMG}city-singapore.jpg`, label: "Singapore", tags: ["Regional hub", "Founders"] },
{ src: `${IMG}city-newyork.jpg`, label: "New York", tags: ["Expansion", "Senior hires"] },
{ src: `${IMG}city-capetown.jpg`, label: "Cape Town", tags: ["Remote teams", "Contracts"] },
{ src: `${IMG}city-dubai.jpg`, label: "Dubai", tags: ["Private clients", "Residency"] },
]
export default function FanGalleryDemo() {
return (
<div className="w-full bg-white" 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" />
<style>{`.font-serif{font-family:"Newsreader","Iowan Old Style","Palatino Linotype",Georgia,serif}`}</style>
<FanGallery cards={cities} />
</div>
)
}
















