Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultScrollWindow Headline Swap
Wheel Arc SliderBrowse all 182Highlight Word List
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Window Headline Swap

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • ScrollTrigger
  • SplitText

Setup

npm i gsapregisterPlugin(ScrollTrigger, SplitText)

More like this

  • Grid
  • Pinned
  • Split text
  • ScrollTrigger
  • Parallax

Features.

  • A three-row line grid where each middle cell is a window onto a headline fixed in the middle of the screen
  • As the rows pass, the headlines drift up and swap word by word: old words lift out while the next message rises in
  • Fully scrubbed, so the swap follows the scroll in both directions
  • Tall side pictures drift with a parallax on devices with a mouse, scaled so their edges never show
  • Below 992px the rows stack and reveal as they enter: masked words rise, the picture opens from a clip and zooms in
  • Respects prefers-reduced-motion: headlines sit in their cells and fade in, with no parallax

How to get it right.

Three short headlines

The timeline is built for exactly three rows. Two short lines per headline read best through the window; long headlines spill past the cell edges, where the window clips them.

Use tall pictures

Each row takes its height from its picture's desktop crop (--wts-frame-ratio on the frame, e.g. 355 / 699). Taller crops hold that row's message on screen for longer. Stacked layouts crop every picture to 220 / 275.

Keep the page around it plain

The headlines are position: fixed inside a clip-path window. A parent with a transform or filter turns fixed positioning into absolute, and the effect breaks.

Tune the parallax

data-au-parallax is the drift in px at 16px text. 200 is lively; 100 is calmer; 0 turns it off.

Variations.

  • Calm — data-au-parallax="80"
  • Still pictures — data-au-parallax="0"
  • Light page — set --wts-bg: #fffcf2, --wts-fg: #252422 and --wts-line: rgb(37 36 34 / 0.1) on the section, and --wts-grain, --wts-glow, --wts-glow-2 and --wts-glow-3 to none
  • Wider middle — narrow --wts-side to give the headlines more room

Where it fits.

  • Homepages — three value statements between the hero and the work
  • Product stories — three facts, one picture each
  • Editorial pieces — pull quotes that hand over to each other
  • About pages — what we believe, in three lines

Frequently asked.

Not as it ships. The drift and swap points are timed for three rows; with any other number the script logs an error and stops.

That's the effect: each headline is fixed in the viewport and you see it through its row's middle cell. Scroll and the window passes over it while it swaps.

Something above the section has a transform, filter or contain set, which breaks position: fixed. Remove it from the section's ancestors.

Yes. Override --wts-bg, --wts-fg and --wts-line on the section.

Yes. Load gsap, ScrollTrigger and SplitText before the script; all three are free.

Related components.

NewPro

Arc Collage Hero

Scroll

Pro

Rising Card on Scroll

Scroll

Pro

Outline Paint Reveal

Scroll