top of page
  • Feb 1, 2025
  • 2 min read

Updated: Nov 10, 2025

Adding smooth scrolling to your Wix website enhances user experience by creating a fluid and polished transition between scroll actions.

In this guide, we will implement smooth scrolling using Lenis, a lightweight JavaScript library for smooth page scrolling.


Requirements

  • A Wix Premium Plan (Custom code functionality is only available in premium plans).



Smooth Scroll in a Wix Website Guide


Step 1: Adding the Custom Code

To enable smooth scrolling, we will use Lenis.js. Below is the custom code you need to add to your Wix website:


<style>

/* Ensure the page height is correctly set for Lenis */

html.lenis, html.lenis body {

height: auto;

}


/* Override default scroll behavior */

.lenis.lenis-smooth {

scroll-behavior: auto !important;

}


/* Prevent scrolling when necessary */

.lenis.lenis-stopped {

overflow: hidden;

}

</style>


<script>

// Initialize Lenis with smooth scrolling configuration

const lenis = new Lenis({

lerp: 0.1, // Damping effect for smoothness

wheelMultiplier: 0.7, // Adjust scroll speed

gestureOrientation: 'vertical', // Enable vertical scrolling

normalizeWheel: false, // Preserve native wheel behavior

smoothTouch: false // Disable smooth scrolling for touch devices

});


// Animation frame loop to keep Lenis active

function raf(time) {

lenis.raf(time);

requestAnimationFrame(raf);

}


requestAnimationFrame(raf);

</script>



Step 2: Implementing the Code in Wix Studio

Follow these steps to add the custom code to your Wix website:

  1. Go to your Wix Studio dashboard.

  2. On the bottom-left, click Settings.

  3. In Settings, search or scroll down to find Custom Code.

  4. Click Add Custom Code.

  5. In the pop-up panel:

    • Paste the custom code in the "Paste the code snippet here:" box.

    • Give it a recognizable name like "Smooth Scroll".

    • Apply the code to all pages.

    • Set the placement to Head.

  6. Click Apply.




Step 3: Testing the Smooth Scroll Effect

  • Refresh your published website to activate the smooth scrolling effect.

  • Scroll up and down to experience the fluid transition.

  • If you want to adjust the smoothness, modify the lerp and wheelMultiplier values in the script.



Credits
Conclusion

Adding smooth scrolling to a Wix website significantly improves the user experience, giving it a professional touch. Following this guide, you can effortlessly integrate Lenis.js and achieve a seamless scrolling effect on your Wix site.

Comments


How to Add Smooth Scroll in a Wix Website

Adding smooth scrolling to your Wix website enhances user experience by creating a fluid and polished transition between scroll actions.

In this guide, we will implement smooth scrolling using Lenis, a lightweight JavaScript library for smooth page scrolling.


Requirements

  • A Wix Premium Plan (Custom code functionality is only available in premium plans).



Smooth Scroll in a Wix Website Guide


Step 1: Adding the Custom Code

To enable smooth scrolling, we will use Lenis.js. Below is the custom code you need to add to your Wix website:

<script src="https://unpkg.com/@studio-freight/lenis@1.0.42/dist/lenis.min.js"></script>


<style>

/* Ensure the page height is correctly set for Lenis */

html.lenis, html.lenis body {

height: auto;

}


/* Override default scroll behavior */

.lenis.lenis-smooth {

scroll-behavior: auto !important;

}


/* Prevent scrolling when necessary */

.lenis.lenis-stopped {

overflow: hidden;

}

</style>


<script>

// Initialize Lenis with smooth scrolling configuration

const lenis = new Lenis({

lerp: 0.1, // Damping effect for smoothness

wheelMultiplier: 0.7, // Adjust scroll speed

gestureOrientation: 'vertical', // Enable vertical scrolling

normalizeWheel: false, // Preserve native wheel behavior

smoothTouch: false // Disable smooth scrolling for touch devices

});


// Animation frame loop to keep Lenis active

function raf(time) {

lenis.raf(time);

requestAnimationFrame(raf);

}


requestAnimationFrame(raf);

</script>



Step 2: Implementing the Code in Wix Studio

Follow these steps to add the custom code to your Wix website:

  1. Go to your Wix Studio dashboard.

  2. On the bottom-left, click Settings.

  3. In Settings, search or scroll down to find Custom Code.

  4. Click Add Custom Code.

  5. In the pop-up panel:

    • Paste the custom code in the "Paste the code snippet here:" box.

    • Give it a recognizable name like "Smooth Scroll".

    • Apply the code to all pages.

    • Set the placement to Head.

  6. Click Apply.




Step 3: Testing the Smooth Scroll Effect

  • Refresh your published website to activate the smooth scrolling effect.

  • Scroll up and down to experience the fluid transition.

  • If you want to adjust the smoothness, modify the lerp and wheelMultiplier values in the script.



Credits
Conclusion

Adding smooth scrolling to a Wix website significantly improves the user experience, giving it a professional touch. Following this guide, you can effortlessly integrate Lenis.js and achieve a seamless scrolling effect on your Wix site.

More Blogs

Jun 27, 2026

StyleSync ~ Import Styles
Import color and text styles from Figma, CSS, JSON, or any website directly into Framer as native styles — in seconds.

Web

May 31, 2026

Advanced CMS Slideshow for Framer
CMS Slideshow Pro is a powerful and highly customizable slideshow component for Framer CMS collections. Create responsive slideshows, infinite carousels, and continuous marquee layouts with advanced controls, smooth interactions, and native-feeling customization.

Web

Jan 10, 2026

Smart Animated Counters in Wix Studio
Learn how to add smart animated number counters to your Wix Studio site. This step-by-step guide provides a copy-and-paste Velo code snippet that automatically handles complex formats, such as 10k, $500, or 98% satisfaction.

Web

How to Add Smooth Scroll in a Wix Website

Adding smooth scrolling to your Wix website enhances user experience by creating a fluid and polished transition between scroll actions.

In this guide, we will implement smooth scrolling using Lenis, a lightweight JavaScript library for smooth page scrolling.


Requirements

  • A Wix Premium Plan (Custom code functionality is only available in premium plans).



Smooth Scroll in a Wix Website Guide


Step 1: Adding the Custom Code

To enable smooth scrolling, we will use Lenis.js. Below is the custom code you need to add to your Wix website:

<script src="https://unpkg.com/@studio-freight/lenis@1.0.42/dist/lenis.min.js"></script>


<style>

/* Ensure the page height is correctly set for Lenis */

html.lenis, html.lenis body {

height: auto;

}


/* Override default scroll behavior */

.lenis.lenis-smooth {

scroll-behavior: auto !important;

}


/* Prevent scrolling when necessary */

.lenis.lenis-stopped {

overflow: hidden;

}

</style>


<script>

// Initialize Lenis with smooth scrolling configuration

const lenis = new Lenis({

lerp: 0.1, // Damping effect for smoothness

wheelMultiplier: 0.7, // Adjust scroll speed

gestureOrientation: 'vertical', // Enable vertical scrolling

normalizeWheel: false, // Preserve native wheel behavior

smoothTouch: false // Disable smooth scrolling for touch devices

});


// Animation frame loop to keep Lenis active

function raf(time) {

lenis.raf(time);

requestAnimationFrame(raf);

}


requestAnimationFrame(raf);

</script>



Step 2: Implementing the Code in Wix Studio

Follow these steps to add the custom code to your Wix website:

  1. Go to your Wix Studio dashboard.

  2. On the bottom-left, click Settings.

  3. In Settings, search or scroll down to find Custom Code.

  4. Click Add Custom Code.

  5. In the pop-up panel:

    • Paste the custom code in the "Paste the code snippet here:" box.

    • Give it a recognizable name like "Smooth Scroll".

    • Apply the code to all pages.

    • Set the placement to Head.

  6. Click Apply.




Step 3: Testing the Smooth Scroll Effect

  • Refresh your published website to activate the smooth scrolling effect.

  • Scroll up and down to experience the fluid transition.

  • If you want to adjust the smoothness, modify the lerp and wheelMultiplier values in the script.



Credits
Conclusion

Adding smooth scrolling to a Wix website significantly improves the user experience, giving it a professional touch. Following this guide, you can effortlessly integrate Lenis.js and achieve a seamless scrolling effect on your Wix site.

More Blogs

Jun 27, 2026

StyleSync ~ Import Styles
Import color and text styles from Figma, CSS, JSON, or any website directly into Framer as native styles — in seconds.

Web

May 31, 2026

Advanced CMS Slideshow for Framer
CMS Slideshow Pro is a powerful and highly customizable slideshow component for Framer CMS collections. Create responsive slideshows, infinite carousels, and continuous marquee layouts with advanced controls, smooth interactions, and native-feeling customization.

Web

Jan 10, 2026

Smart Animated Counters in Wix Studio
Learn how to add smart animated number counters to your Wix Studio site. This step-by-step guide provides a copy-and-paste Velo code snippet that automatically handles complex formats, such as 10k, $500, or 98% satisfaction.

Web

bottom of page