Expanding Hero

A headline with a small video set between its words. As you scroll, the window opens until it fills the screen, pushing the words off its edges.

  • Hero
  • Scroll
  • Video

Uses motion, clsx, tailwind-merge

Open in ChatGPTOpen in Claude

Make things that move

A studio for motion design

Get in touch

Selected work

2024–2026
  • Lumen2026
  • Parcel2025
  • Halcyon2025
  • Fieldnote2024

Installation

Add the component on its own with the CLI, or copy the file in by hand.

The CLI writes components/ui/expanding-hero.tsx and installs motion, clsx and tailwind-merge. It needs the @keyframeui registry in components.json; add it once per project.

npx shadcn@latest add @keyframeui/expanding-hero

Examples

Finished sections built with Expanding Hero. Each one installs whole, with the component included.

Product Launch

An app screenshot instead of a video, built in markup so it stays sharp full screen. A "Watch the demo" button appears once it fills the box.

Your work, in one place

Docs, tasks and roadmaps for teams that ship together.

tandem.app/q3-launch
Projects / Q3 Launch
Share
Q3 LaunchOn track
Tasks done

128 / 164

Open docs

24

Days to launch

18

Burn-upLast 6 weeks
Up next
  • Final pricing copyMK
  • Launch film, cut 3JS
  • Press kitAL
  • Changelog postMK
RoadmapJul – Sep
Pricing page
Launch film
Press and launch day

Docs

Specs, briefs and notes that link straight to the work they describe.

Tasks

Boards and lists that stay in step with the doc that started them.

Roadmaps

Every project on one timeline, updated as tasks move.

Event

A conference hero with an aftermovie and a bolder headline. The date and city chips live inside the halves, so they fly off with the words.

ConfigSept 24–25 2026San Francisco

Two days on design, craft and the tools behind them.

Get tickets

Schedule

Day 1Thu, Sept 24

  • Opening keynote
  • The craft of small details
  • Designing for motion
  • Evening party

Day 2Fri, Sept 25

  • Tools for thinking
  • Building design systems that last
  • Live redesign
  • Closing keynote

Props

beforeRequired

TypeReact.ReactNode

The words before the window. One to three short words read best. Anything attached to them, like a chip, is pushed off with them.

afterRequired

TypeReact.ReactNode

The words after the window.

mediaRequired

TypeReact.ReactNode

What plays in the window: a video, an image or any element. It always covers the whole stage and never resizes; the window is a mask that opens onto it.

children

TypeReact.ReactNode

Content under the headline, such as a subtitle and a button. It fades out early and rides the window's bottom edge away.

overlay

TypeReact.ReactNode

Shown over the media once it fills the stage, like a play button. Centered; it fades in before the section unpins.

scrollLength

TypenumberDefault2

How long the section stays pinned, in stage heights. The window opens over the first 78%; the overlay fades in over the rest. Much longer than 2 starts to feel like the page has taken over the scroll.

radius

Typenumber | stringDefault"0.22em"

The window's corner radius at the start. A number is in pixels; a string is any CSS length, and em follows the headline's size. The corners square off as the window meets the stage's edges.

containerRef

TypeReact.RefObject<HTMLElement | null>

Scroll container to track. Defaults to the window. The container must be positioned (e.g. relative).

stageClassName

TypestringDefault"h-dvh"

Classes for the pinned stage. Set its height here.

headlineClassName

Typestring

Classes for the headline, such as its font, weight and size. The default size scales with the stage's width.

windowClassName

Typestring

Classes for the window's starting size. Defaults to 1.6em by 0.8em between the words, and to a 16:10 card on its own line on stages narrower than 48rem, where the words stack above and below it.

className

Typestring

Extra classes for the outer section. Other props pass through to it. With reduced motion, nothing pins: the headline sits above the media at full width.