Appearance
Are you an LLM? You can read better optimized documentation at /asli/html/template-options/smooth-scroll.md for this page in Markdown format
Smooth Scroll
| Customization | Reference |
|---|---|
| Edit options in | 📄 HTML/js/app.js |
| Options object | 🔧 app.options.smoothScroll |
| Component source | 📄 HTML/js/components/Scroll.js |
| Component source (Gulp) | 📄 SOURCE/components/scroll/Scroll.js |
Default Options
js
window.app = {
options: {
// other options
smoothScroll: {
enabled: true,
duration: 1.2,
easing: gsap.parseEase('expo.out'),
useGSAPRaf: true
}
}
}HTML Markup
This component doesn't require any specific HTML markup.
Customization
1. Enabling Native Scrolling
Set the enabled option key to false to disable smooth scrolling. This will also offload the dependent smooth scrolling library.
js
smoothScroll: {
enabled: false,
duration: 1.2,
easing: gsap.parseEase('expo.out'),
useGSAPRaf: true
}2. Adjusting Smooth Scrolling Inertia
Modify the duration option, which accepts float numbers. The higher the value, the more inertia effect will be applied when you release the scrolling wheel, and vice versa.
js
smoothScroll: {
enabled: true,
duration: 2.4,
easing: gsap.parseEase('expo.out'),
useGSAPRaf: true
}