Locomotive Scroll v5.0.1
Version 5 is a complete rewrite of Locomotive Scroll, now built on top of Lenis.
Highlights
- Lighter & Faster β 9.4kB gzipped (down from ~12.1kB in v4)
- TypeScript First β Fully typed with complete IntelliSense support
- Built on Lenis β Modern smooth scroll engine with native scrollbar
- Dual Intersection Observer Strategy β Optimized detection for triggers vs. continuous animations
- Smart Touch Detection β Parallax auto-disabled on mobile for native scrolling
- Custom Scroll Containers β Full-page or contained scrolling support
- No Layout Shifts β No more greedy CSS transforms breaking your layouts
- Native CustomEvents β No more ModularJS dependency
- New Landing Page β scroll.locomotive.ca
- New Documentation β Completely rewritten docs with examples
Breaking Changes
This version contains breaking changes from v4. Notable removals:
data-scroll-containeranddata-scroll-section(no longer needed)data-scroll-sticky(use CSSposition: sticky)data-scroll-delay,data-scroll-direction,data-scroll-target- ModularJS integration (use native CustomEvents)
- Custom scrollbar (use native scrollbar)
Migration Guide
Upgrading from v4? Check out the Migration Guide for detailed instructions.
Documentation
- Landing Page: scroll.locomotive.ca
- Documentation: scroll.locomotive.ca/docs
- Examples: scroll.locomotive.ca/docs/examples
- Showcase: scroll.locomotive.ca/docs/extras/showcase
Acknowledgements
Special thanks to https://github.com/darkroomengineering for https://github.com/darkroomengineering/lenis, the smooth scroll engine powering v5.
Thanks to all contributors who helped shape this release π«Ά