Scroll & Motion
The opposite of the expanding hero. The image starts full-bleed with a large centered headline overlaid, and shrinks into a small rounded card in the center as the reader scrolls. A closing eyebrow, headline, and subtitle fade in below the shrunken card. Great for product-launch pages that want to open loud and land quiet.
Live preview
No extra dependencies. React 18+ and Tailwind CSS v3+ assumed. Save as ReverseShrinkHero.tsx.
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/ReverseShrinkHero.tsx as a client component. A fixed inset-0 canvas at z-10, with a 220vh spacer below to drive scroll. Image box starts with clipPath inset(0 0 round 0px) full-bleed and shrinks to inset(30% 22% round 20px) as progress 0 to 1. An opening headline (large white with text-shadow) sits centered over the image at progress 0 and fades out plus drifts up (-40px) 0 to 0.4. A closing content card fades in 0.6 to 1 near the bottom of the viewport, containing an eyebrow, a semibold headline, and a subtitle in black. Uses rAF plus lerp (0.1) driven by window.scrollY / spacer.offsetHeight. Props: image, openingHeadline, closingEyebrow, closingHeadline, closingSubtitle. Font-sans, max font-semibold. Single default export. No extra deps.
Scroll & Motion
Expanding Clip Scroll Hero (Apple-Style)
Apple-style expanding scroll hero for React: image opens from a small card to full-bleed with a cross-fading text sequence.
Scroll & Motion
Pinned Text Sequence Scroll Hero (Product Story)
Apple product-story scroll hero for React: cross-fading headlines over a fixed full-bleed image, ending in a CTA.
Scroll & Motion
Ascending Image Slide-Up Hero (Type-First)
Type-first scroll hero for React: starts as headline on white, image slides up as text transitions to white.
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.
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.
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.
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.
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.