01 / 05
Click any link in the nav above — scrollToSmooth intercepts the anchor and animates the scroll. Try different easings and durations in the panel below ↙
02 / 05
Fully rewritten in TypeScript with tree-shaking support. The core (with linear easing) is under 5 KB gzipped. Import only what you need.
03 / 05
SnapPlugin, TouchMomentumPlugin, and HorizontalScrollPlugin register via ScrollToSmooth.use() without touching the core bundle.
04 / 05
From linear to easeInOutElastic — all individually importable and tree-shakeable. Change the easing in the panel ↙ and feel the difference.
05 / 05
Drop in the script, point it at your anchor links, set an offset for your sticky header, and you're done. v4 is a drop-in upgrade from v3.