Grids & Galleries

Tilted Card Fan Gallery (Hover to Lift)

A row of 4-6 image cards fanned out at gentle angles, overlapping horizontally. On hover, the target card lifts forward, straightens, and scales up. Great for portfolio hero sections, product galleries, and hero rows that need to show a range at a glance.

Live preview

Loading preview

No extra dependencies. React 18+ and Tailwind CSS v3+ assumed. Save as TiltedCardFanGallery.tsx.

Or rebuild it with a prompt

Paste the prompt into the tool you already use. Each version is written specifically for that tool, matched to the same design constraints so the output stays consistent.

Build components/TiltedCardFanGallery.tsx. Section bg-black overflow-hidden. Centered eyebrow (12px muted) + headline (28-44px semibold white) + subtitle (13px muted white). Below: relative container (w-full aspect 300-420px). Map images: for each i of total, compute mid = (total-1)/2, step = i - mid, angle = step * 6, xOffset = step * 12 (percent), yOffset = |step| * 6. Absolute card top-1/2 left-1/2 w-[54%] sm:w-[42%] aspect-[3/2] rounded-xl overflow-hidden with box-shadow. Transform: translate(calc(-50% + xOffset%), calc(-50% + yOffsetpx)) rotate(angledeg). z-index total - |step|. On hover: translate(-50%, -55%) rotate(0) scale(1.06), z-index 999. transition 0.5s cubic-bezier. Reduced-motion disables. Props: images, eyebrow, headline, subtitle.

How to use it

  1. Great for portfolio hero rows, product galleries, and case-study collections.
  2. Works best with four to six images. More than that and the fan crowds itself.
  3. Hover animation pauses under reduced-motion. Cards still render fanned.

Other components you might like

Related prompts for grids & galleries

Frequently asked questions

How do I use this component in my project?+

Copy the source file from the "Copy code" button and save it into your components folder. Add any listed dependencies (React 18 or later and Tailwind CSS v3 or later are always required, plus framer-motion or gradflow if the component lists them). Import and render the component wherever you want it. Every prop is optional and defaulted.

Can I customise the design and copy?+

Yes. Every component takes props for its content (headline, subtitle, image URL, CTA, and so on) and uses Tailwind classes throughout, so you can restyle without touching the logic. For deeper design changes, paste the prompt into Claude Code, Cursor, Lovable, Replit, or Codex and describe your brand tokens, spacing, or motion tweaks.

Are the components free for commercial use?+

Yes. Everything on this page is free to copy, adapt, and ship in commercial projects. No attribution required. If you post a public showcase we always appreciate a link back.

Which AI coding tool works best for these components?+

All five prompts produce the same design. Claude Code and Codex are best when you want the component slotted into a project with existing conventions. Cursor is ideal for editing inside your IDE with the file open. Lovable and Replit spin up a fresh preview fastest, useful for a quick play.

Do these work with Next.js, Vite, and Remix?+

Yes. The source files are plain React 18 client components. They run on any framework that supports React 18 and Tailwind CSS v3. If a component needs the "use client" directive (all of them do here, since they use hooks), keep the directive at the top of the file when you paste.