Features/Interactions

Scroll-driven animations

Scrub animations with the scroll position using the While Scrolling event, with start and end points you choose.

With the While Scrolling event, an animation's progress follows the scroll position instead of time. You choose where the range starts and ends relative to the element and the screen. Delay and duration are expressed as a share of that range, so several actions can be placed along the scroll. Use it for parallax, progress bars, reveal effects and story-telling sections.

How it works

  • Event dh.scrolling ('While Scrolling'); the editor switches the action unit from seconds to percent when an event is scroll-linked.
  • Range positions: topHitsTop, topHitsMiddle, topHitsBottom, middleHits*, bottomHits* for start and end.
  • delay and duration are hundredths of a percent of the range (max 10000 = whole range).
  • An element already inside the range on page load starts part way through.
  • Reduced motion: nothing is scrubbed; the element shows its end state.

When to use it

  • Parallax background movement
  • A heading that slides while the section scrolls
  • A progress line that fills as the visitor reads

Limitations

  • An element inside the first screen may start part way through its range.

Availability

  • Works in Designer.
  • Included in every plan.

How to use it.

  1. Add an interaction with the While Scrolling event.
  2. Choose start and end positions.
  3. Add Animate actions and place them on the range with delay and duration.

Questions.

Is GSAP ScrollTrigger needed?

Related features.

No card needed

Build it today.Pay when it goes live.

Every feature is unmetered while you build. Checkout opens the first time you publish.