Layered scroll parallax
Hero layers (sun, hills and heading) slide at different speeds as the page scrolls, giving the scene depth.
The React code for this component comes with Pro.
Unlock with ProUse it for
- A destination or property hero where the scene is the message
- One hero per page, as the opening moment
Avoid
- Text-heavy sections, where moving copy is hard to read
- Many parallax sections in a row, which makes scrolling feel slippery
How it works
A passive scroll listener schedules one requestAnimationFrame. Each layer is translated down by scrollTop times its own speed (0.15 for the near hill, 0.7 for the sun), so far layers appear to lag. The heading also fades out over the first 60 percent of the hero. Updates stop once the hero has scrolled out, and only transform and opacity change.
Accessibility
Reduced motion skips the transforms entirely, so the scene scrolls as one flat picture. The layers are decorative; the heading is real text.
Get the source with Pro
The demo above is free to play with. Pro unlocks the source of this and every other Pro component, with copy-ready code and a zip download.
Already bought? Sign in- Pay once
Lifetime
Pay once, keep it forever.
$39once
- Every Pro component, with full source
- Lifetime updates: every future Pro component included
- One zip download, ready to drop into a React app
- Commercial use in unlimited client and personal projects