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
VaultScrollCurved Horizon on Scroll
Solar Eclipse on ScrollBrowse all 182Image Handoff on Scroll
  • 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

Curved Horizon on Scroll

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
  • CustomEase

Setup

npm i gsapregisterPlugin(ScrollTrigger, CustomEase)

More like this

  • Pinned
  • Section transition
  • Glow
  • Gradient
  • ScrollTrigger
  • Sticky
  • Canvas

Features.

  • A dark, curved horizon rises over a day section with a warm glow ahead of it
  • The dark section holds on a full screen, then the edge slides up and away
  • A sunrise glow settles at the top of the next day section
  • Glow, haze and a bright rim are drawn on one 2D canvas: no WebGL, no images
  • Headings rise through a mask once their section is on screen, and leave faster than they arrive
  • Curve, glow height, start height, dark hold and scroll catch-up are options; every colour is a variable
  • Respects prefers-reduced-motion: the edge follows the scroll and copy appears at once

How to get it right.

Keep the three scenes and the canvas in order

The two day scenes come first, then the canvas, then the night scene. The canvas paints the dark over the day scenes, and the night scene's copy sits on top of the canvas.

Put content in the scenes, not on the stage

Each scene fills the screen. "before" is visible from the start, "night" while the screen is fully dark, "after" once the dark starts to leave. Anything placed straight on the stage shows the whole time.

Mark what should animate

A line with data-hrz-line inside a .hrz_mask rises in. Anything else with data-hrz-fade fades up 16px after the lines. Unmarked content just sits in its scene.

Leave room to scroll

The track is 390vh: about 1.3 screens for the rise, half a screen of hold (at the default hold) and 1.1 for the leave. Change --hrz-length for a slower or faster pass.

Variations.

  • Flatter edge — data-au-curve="0.1"; 0 is a straight line
  • Taller sunrise — data-au-glow="0.5"
  • Edge out of sight at the start — data-au-start="0"; higher values show more of the dark before any scroll
  • Longer dark section — data-au-hold="1"; 0 leaves as soon as the screen is dark
  • Locked to the scroll — data-au-scrub="0"
  • Your palette — override --hrz-night, --hrz-air, --hrz-rim and --hrz-ramp-1 … --hrz-ramp-7 on the root, then call refresh()
  • A second line — add another <span class="hrz_mask"><span class="hrz_line" data-hrz-line>…</span></span> to a title; lines follow 0.08s apart
  • A sentence or a button — add it to a scene with data-hrz-fade

Where it fits.

  • Landing pages — the turn from a hero into a darker feature section and back
  • Case studies — a chapter break
  • Launch pages — a dark reveal between two day sections

Frequently asked.

Not as it ships: the three legs are one timeline. Follow the track with a dark section and shorten --hrz-length if you never want the edge to leave.

No. It is a 2D canvas, redrawn only when the scroll moves.

The script reads the canvas colours once. Change the variables, then call window.au.HorizonSweep.refresh().

The layer itself lets clicks through so links in the day sections still work. Its copy takes clicks as normal.

Related components.

NewPro

Arc Collage Hero

Scroll

Pro

Rising Card on Scroll

Scroll

Pro

Outline Paint Reveal

Scroll