Implement Smooth Scroll & Parallax Effect in Next.js using Lenis and GSAP

  Рет қаралды 15,021

CodeBucks

CodeBucks

Күн бұрын

In this tutorial we will learn to implement how to add smooth scrolling with parallax effect in Next.js!🤩
Demo Link🖤: smooth-scroll-next-js.vercel....
Blog📖: devdreaming.com
-----------------------------------------------------------------------------------------------------------
Final CODE:
➡ Link 💚(Give ⭐ to the repo): github.com/codebucks27/Smooth...
-----------------------------------------------------------------------------------------------------------
Hey there 👋,
In this tutorial, we'll learn to implement smooth scrolling website
Here's what you'll learn in this tutorial:
🌟 How to add smooth scroll in Next.js project
🌟 How to implement parallax effect with this smooth scroll using GSAP
🌟 How to add parallax effect on different elements
🌟 How to use events like onScroll in smooth scroll
For this project, we're going to use:
🌟 Next.js
🌟 Lenis Scroll
🌟 GSAP
Whether you're a complete beginner or an experienced web developer, this next.js tutorial will teach you everything you need to know implement smooth scroll in your next.js website.
Like, Sub🥂 & Share! ♥
Follow me on 👇:
Twitter🐤 : / code_bucks
LinkedIn 🔗: / codebucks
Instagram 📫: / code.bucks
Email 📧: codebucks27@gmail.com
Learn More About,
⭐ • Next.js Blog Tutorial:...
⭐ • How to Create a Stunni...
⭐ • React Website Tutorial...
⭐ • 🔥Build a Stunning Fash...
⭐ • 🔥Create an NFT Collect...
⭐ • 🔥Build a Stunning Port...
⭐ • Build Websites Using N...
⭐ • Build Websites with Re...
Timestamps⌛:
Intro + Demo @00:00:00
Setup & Installation @00:02:24
Adding Lenis smooth scroll @00:04:20
Add Images @00:06:56
Adding Parallax Effect @00:13:10
Implement scrollTo method @00:25:15
Disclaimer:
All videos are for educational purposes only, please use them wisely.
#gsap
#parallaxeffect
#nextjstutorial

Пікірлер: 28
@flavioczuk
@flavioczuk 4 ай бұрын
@CodeBucks
@CodeBucks 4 ай бұрын
Glad I could help!
@kingpamz
@kingpamz 7 ай бұрын
Thanks bro Would love to see more animation tutorials using next js
@CodeBucks
@CodeBucks 7 ай бұрын
Sure thing! More to come👍
@MdTasnimulHaque
@MdTasnimulHaque 6 ай бұрын
Thanks Man, you saved a lot of time ❤
@CodeBucks
@CodeBucks 6 ай бұрын
Glad to hear that!
@tanishkshrivastava9921
@tanishkshrivastava9921 15 күн бұрын
hey bro you used use client in the layout.js and it is used in all the components so how to tackle it?
@CodeBucks
@CodeBucks 13 күн бұрын
Hey, I have not used "use client" in layout.js file.
@user-nk8eb7ku6c
@user-nk8eb7ku6c 7 ай бұрын
Why are you so underrated ?
@CodeBucks
@CodeBucks 7 ай бұрын
Well trying to figure it out😜
@aurelianspodarec2629
@aurelianspodarec2629 4 ай бұрын
@@CodeBucks Still lots to improve
@mageshyt2550
@mageshyt2550 7 ай бұрын
hey bro i have issue with lenis, its not scrolling to the bottom of the page, which means i cant able to see the footer do u have any idea how to fix it. i am not using rect package, normal lenis in next js
@CodeBucks
@CodeBucks 7 ай бұрын
Hey, can you share your code repo or anything that can help me debug the issue? You can invite me to your repo. my email is codebucks27@gmail.com
@sam00305
@sam00305 4 ай бұрын
Hi, for the parallax: sometimes the children are moving up or down on the page load. i tried to fix this by adding extra margin and moving them lower to their original position but this causes them to move a second after the page loads, due to the parallax component. Any way to fix this?
@CodeBucks
@CodeBucks 4 ай бұрын
Usually in parallax effect the elements should not move unless you scroll. Why are you moving the elements on page load? Could you explain the type of animation that you are trying to achieve?
@sam00305
@sam00305 4 ай бұрын
they are moving automatically even before i scroll, i thought maybe i made a mistake somwhere so i tried to copy your code and got the same result. All the children of the parallax component just move up if there speed is negative or down if their speed is positive when the page first loads@@CodeBucks
@fardeensayyed70
@fardeensayyed70 8 ай бұрын
How to start learning javascript and where can you suggest
@CodeBucks
@CodeBucks 8 ай бұрын
How much do you know about the JavScript till now? Based on that I can give you suggestions.
@pulpxi
@pulpxi 26 күн бұрын
doesnt making the lenis wrapper comp "use client" also all children "use client"?, sry im new to nextjs
@CodeBucks
@CodeBucks 23 күн бұрын
Any component that requires interaction with DOM or user then you should include "use client" directive at the top of the component. Could you explain a bit more about lenis issue?
@harshvaidya130
@harshvaidya130 7 ай бұрын
Bhai ek nextjs ka acha portfolio bnwa do updated version
@CodeBucks
@CodeBucks 7 ай бұрын
Yes bro will do!
@chrisw.1252
@chrisw.1252 6 ай бұрын
good tutorial however the smooth scroll will not work well with Chrome or Safari, but works fine in firefox. There are a bunch or articles online about this. Not sure why it is working for you, but for me it was not.
@CodeBucks
@CodeBucks 6 ай бұрын
I think it's working fine on chrome, I have also used it in my other project. I don't know why it's not working for you. Can you share any one article that you have mentioned?
@24pratikbhagwat5
@24pratikbhagwat5 4 ай бұрын
same bro its not working for me on chrome
@greendsnow
@greendsnow 7 ай бұрын
i'm allergic to gsap. it cost money on commercial projects.
@CodeBucks
@CodeBucks 7 ай бұрын
You are right for some plugins you have to pay money if you are using them in commercial projects but most of the plugins are open sources so I guess you can use them. If you don't want to use gsap then I'd suggest you can check react-spring as well.
@dukeselwood
@dukeselwood 3 ай бұрын
framer-motion is better than GSAP and completely free
How to Make a Zoom Parallax using Next.js and Framer Motion
13:13
Olivier Larose
Рет қаралды 22 М.
Create a Website Intro with ReactJS + GSAP in 10 Minutes
11:00
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 12 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 93 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 39 МЛН
Landing page with Parallax & Smooth Scroll using Lenis and Framer Motion
23:23
Smooth Scrolling Magic: How to easy Install LENIS Library in Elementor
3:35
Lenis Smooth Scroll & ScrollTrigger: A Perfect Animation Duo
10:18
Incredible scroll-based animations with CSS-only
32:23
Kevin Powell
Рет қаралды 403 М.
Hacker101 - JavaScript for Hackers (Created by @STOKfredrik)
24:17
Stop Killing Games - 2
8:04
Pirate Software
Рет қаралды 29 М.
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 12 МЛН