Scroll & Motion
A pinned hero canvas that opens like an Apple product page. The image starts contained inside a small rounded rectangle in the center of the viewport, then expands to a full-bleed background as the reader scrolls. An opening headline, a mid-scroll punchline, and a final title-plus-subtitle cross-fade across the scroll. Uses requestAnimationFrame plus lerp smoothing for buttery motion.
Live preview
No extra dependencies. React 18+ and Tailwind CSS v3+ assumed. Save as ExpandingClipHero.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/ExpandingClipHero.tsx as a client component. It renders a fixed inset-0 canvas at z-10 that pins the hero to the viewport, plus a 250vh spacer below to drive the scroll. Inside the canvas: (1) an SEO header layer with an eyebrow and a small headline centered, visible at scroll progress 0 and fading out 0 to 0.3; (2) a mid-scroll headline that fades in 0.2 to 0.35, holds 0.35 to 0.6, fades out 0.6 to 0.75; (3) an image box that starts with clipPath inset(25% 15% round 12px) and animates to inset(0% 0% round 0px) as progress goes 0 to 1; (4) a final content overlay inside the image box (headline plus subtitle in white) that fades in 0.8 to 1. Use a requestAnimationFrame loop that lerps target progress toward current (0.1 factor). Read scroll via window.scrollY divided by spacer.offsetHeight, clamped 0 to 1. Font-sans throughout, max font-semibold. Props: image, eyebrow, headline, midHeadline, finalHeadline, finalSubtitle. Single default export. No extra dependencies.
Scroll & Motion
Reverse Zoom Scroll Hero (Full-Bleed to Card)
Zoom-out scroll hero for React, full-screen image shrinks into a rounded card as the reader scrolls, closing content fades in.
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.