New features in Lenis v2
mainLenis v2 introduces several improvements for a more seamless developer experience and expanded capabilities:
- Auto CSS injection: Critical styles are injected at runtime, removing the need to manually import
lenis.css. - Pull to refresh & UI collapse: Support for native browser behaviors when
touch.smoothis enabled. - Multi-axis scrolling: Support for simultaneous X and Y scrolling (e.g., for 2D canvas navigation or spreadsheets).
- Development Warnings: Warnings in development mode when calling
infiniteonhtml/bodyto prevent iOS flickering.