"Scroll to Target" duration seems hard-capped at 0.8s – is data-scroll-speed supposed to allow slower/longer scrolls?

Hi all,

I’m trying to slow down the “Scroll to Target” animation on a few buttons that jump quite far down the page (several thousand pixels), so the scroll feels smooth/relaxed instead of a quick jump. I raised the data-scroll-speed attribute on the button (currently at 8000), but no matter how low I set it, the animation never seems to take longer than roughly 0.8 seconds.

Looking at the scrollToTarget() function in blocs.min.js, I think I found why:

js

var time = Math.max(.1, Math.min(Math.abs(scrollY - scrollTargetY) / speed, .8));

If I’m reading this correctly, time (the actual scroll duration in seconds) is calculated as distance / speed, but it’s clamped to a maximum of 0.8 seconds — regardless of how far the scroll target is or what data-scroll-speed value is set. So for any button where distance / speed is already ≥ 0.8 (which happens quickly on longer pages), lowering data-scroll-speed further has no effect at all — the animation is already at the hard cap.

Example from my project: distance to target ≈ 6400px, data-scroll-speed = 80006400 / 8000 = 0.8 → already at the ceiling. Even setting it to 1000 would still just clamp to 0.8s.

Questions:

  1. Is this 0.8s cap intentional (e.g. to prevent “Scroll to Target” from feeling sluggish on very long pages)?

  2. Is there a supported way to raise this cap for specific buttons/links, without hand-editing blocs.min.js (which would get overwritten on the next export/update)?

  3. If not, would it be possible to expose the cap as a configurable value in a future Blocs update — or via a documented custom attribute?

Any insight from the team or from anyone who has run into the same limitation would be much appreciated!

Thanks, Alex

Brics :wink: SmoothFlow - GSAP Smooth Scrolling & Parallax for Blocs