ScrollFlow
Your new library for the best scrolling experiences
It’s a new way to create scroll animations, smooth effects and overlapping elements.
ScrollFlow is designed to be lightweight, fully responsive and stable, available under the MIT license.
<div class="scrollflow">
<div class="sf-wrapper">
<div class="sf-section">
...
</div>
<div class="sf-section">
...
</div>
</div>
</div>
document.addEventListener('DOMContentLoaded'
, () => {
const scrollFlow = new ScrollFlow();
scrollFlow.init();
// Example of using onChange
//callback
scrollFlow.onChange((direction
, currentIndex, targetIndex) => {
console.log(direction,
currentIndex, targetIndex);
});
});
<div
class="scrollflow horizontal fade-content
paginate">
<div class="sf-wrapper">
<div class="sf-section">
...
</div>
<div class="sf-section">
...
</div>
</div>
</div>