Skip to content

Smooth scrolling

AF can set up smooth scrolling for your site using GSAP’s ScrollSmoother plugin. AF supports all ScrollSmoother parameters that GSAP ScrollSmoother has.

How it works

To set up smooth scrolling, you need to specify smooth scrolling parameters when you initialize AF. You can do it like this:

AF.init({
scrollSmoother: {
enabled: true,
options: {
smooth: 1,
effects: true,
smoothTouch: 0.1,
}
}
})

If you don’t want to specify extra parameters (any of GSAP’s ScrollSmoother parameters are supported), you can just set enabled to true and it will use default values:

AF.init({
scrollSmoother: {
enabled: true
}
})