How to Code Page Transitions With Next.js Using Framer Motion | Tutorial

  Рет қаралды 99,865

Akram

Akram

Күн бұрын

Пікірлер: 146
@Francois3k
@Francois3k 5 жыл бұрын
Broooo you're killing KZbin with this content. This is the punch I needed for my portfolio I was looking for. Man I'm glad I found ur channel keep up the dope content. Still your 1# fan on KZbin for code an design!!!
@WrongAkram
@WrongAkram 5 жыл бұрын
Day 1 💪🏽
@sykowhite9465
@sykowhite9465 5 жыл бұрын
such an underrated web design channel .. you are killing it bro!
@WrongAkram
@WrongAkram 5 жыл бұрын
Thank ya :)
@wixnarara
@wixnarara 4 жыл бұрын
This explains almost everything on framer motion in 30 minutes. I am amazed. I go back to this video everytime I pick up framer motion for a project.
@WrongAkram
@WrongAkram 4 жыл бұрын
Thats awesome to hear!
@CrashDSInc
@CrashDSInc 3 жыл бұрын
I like your teaching style. Instead of just saying "We need animate presence", you went into what it was and what it did. So many other tuts out there just say 'what' to do, and neglect the 'why'.
@yunusemrealpak6118
@yunusemrealpak6118 5 жыл бұрын
You really made me love to make a site. You show us that animations aren't as hard as they seem. Don't let it end. We need you!
@WrongAkram
@WrongAkram 5 жыл бұрын
Thanks man 🙏🏽 So much more coming!
@yunusemrealpak6118
@yunusemrealpak6118 5 жыл бұрын
@@WrongAkram I'm currently writing my own blog site using what I've learned from you. I'd like to share with you when I'm finished. Then let's coding
@mostafaesmaiel1143
@mostafaesmaiel1143 4 жыл бұрын
maybe this is the first time I commented in youtube, wanted to let you know you're really good! keep it up!
@junog5552
@junog5552 2 жыл бұрын
What's wrong, Akram? :D No videos for the past 1+ years? The way you teach is incredible. It was so easy to grasp all the details that now I'm subbed and added all of your videos to queue to watch one by one. Amazingly put together. Appreciate the effort. I hope you are well and safe. Hope to see more content soon. Best of luck with your life.
@dadabranding3537
@dadabranding3537 Жыл бұрын
facts. one of the best
@junog5552
@junog5552 Жыл бұрын
Indeed
@berakoc8556
@berakoc8556 4 жыл бұрын
That helped me a lot. You are awesome. I was struggling lately with Motion and this video is my remedy.
@skanda_myil
@skanda_myil 3 жыл бұрын
Best Tutorial ......I watched many videos on Framer Motion but your explanation is very easy to understand easily
@arthurprather6720
@arthurprather6720 5 жыл бұрын
Never knew about this library, Liked it. This look much closer to Pose but a lot simpler. Thank for sharing.
@growie000
@growie000 4 жыл бұрын
Wow such a good video! I am getting used to Framer now for designing and prototyping, but I didn't know it could be used for real web project! I'm happy to watch your video. It showed me how awesome framer motion could be , Thanks!
4 жыл бұрын
An amazing tutorial with just the necessary information and without any distractions. You just gained a subscriber :D Keep up this good work, bravo!
@WrongAkram
@WrongAkram 4 жыл бұрын
Awesome, thank you! Thanks for the sub :)
@IDroidDude
@IDroidDude 4 жыл бұрын
MY MAN! This was AWESOME. FINALLY some great content on YT. Definitely second more Awwwards series of Framer Motion + NextJS or CRA. Btw, it would be even better if you could come up with a video on the thought process of how you actually replicate a site! Great content as usual LOVE IT!
@WrongAkram
@WrongAkram 4 жыл бұрын
Thanks! Will do!
@pranav854
@pranav854 3 жыл бұрын
Absolutely incredible tutorial mate!
@iUmerFarooq
@iUmerFarooq 4 жыл бұрын
Killing one. Do another tutorial on React js + Framer motion. And please increase the font size because your monitor is to big. Thank you
@jaredbrown6178
@jaredbrown6178 4 жыл бұрын
This is my first KZbin comment I've felt compelled to leave ... ever. But honestly, if you turned this content into full courses with more robust sites, this s*** is something I would totally pay for. I'm a very comfortable react dev (I use Gatsby in an medium sized agency setting, and in my creative studio for side projects with smaller brands), but using animation libraries for animations/page transtions, etc., aren't as intuitive as the docs make them out to be. And this is insanely helpful.
@WrongAkram
@WrongAkram 4 жыл бұрын
Wow thank you so much for the kinds words. I am planning to make a course this year which will be super affordable, so keep an eye out :)
@pashapear-who
@pashapear-who 4 жыл бұрын
Great tutorial! Very clear explanation and super useful
@jeeves251
@jeeves251 5 жыл бұрын
Fantastic. Thank you! I learned a ton and now I'm going to start animating everything with Framer Motion :)
@WrongAkram
@WrongAkram 5 жыл бұрын
It's pretty awesome!
@rtnjo6936
@rtnjo6936 4 жыл бұрын
woooooooooooooooooooooooooooooooooooooooow, REAL CONTENT HERE. i'vebenn wodering about this topic, ty bro
@WrongAkram
@WrongAkram 4 жыл бұрын
Glad you found me!
@amirhaddad5985
@amirhaddad5985 5 жыл бұрын
Great bro...you must have 100k subscribers...❤
@WrongAkram
@WrongAkram 5 жыл бұрын
Lol, 1 day. I’ll come back to this comment when we get there 😊
@sukritsaha5632
@sukritsaha5632 Жыл бұрын
Hey, exitBeforeEnter is deprecated now so can you make another video with the updated features. I really want to learn page transitions.
@ZEESHANJUNAID2222
@ZEESHANJUNAID2222 5 жыл бұрын
great tutorial again..... really appreciate what you're doing, just a humble suggestion, next time when you do tutorial with one of these (react/next/gatsby), kindly explain a bit verbally how we can do it the same with other two (gatsby), i think gatsby and next both are growing with very little resources, we need more people like you to share more knowledge with react, next and gatsby. thumbs up!
@WrongAkram
@WrongAkram 5 жыл бұрын
Thanks! I’ll keep that in mind. Hoping to make more react tutorials whether it be cra, next or gatsby.
@FilipeFreire
@FilipeFreire 3 жыл бұрын
Explained perfectly! Thanks a bunch :)
@backendfyi
@backendfyi 5 жыл бұрын
Lovely tutorial ❤️👊🏼
@WrongAkram
@WrongAkram 5 жыл бұрын
Thanks man!
@seanhuggins5382
@seanhuggins5382 3 жыл бұрын
Fantastic video dude, genuinely
@winoffrg
@winoffrg 3 жыл бұрын
More videos please. Really enjoying your channel ❤️❤️❤️🥰 Especially Awwwards Rebuild . Thanks a lot for ur great work
@amirnoorani5017
@amirnoorani5017 3 жыл бұрын
You are Awesome just like NextJs!
@gerardsegismundo8931
@gerardsegismundo8931 4 жыл бұрын
Please do an awward series of this. Using Next with Framer Motion or GSAP. BTW, I really like your awward series, it was very helpful.. I also recommeded your channel to my friends, and they're very glad with it.. I'm glad to found your channel. Thanks!
@WrongAkram
@WrongAkram 4 жыл бұрын
Wow. Thanks for sharing! I’ll be working on my next awwwards series soon!
@rofazayn
@rofazayn 5 жыл бұрын
Hi Akram, first of all thank you so much for these awesome tutorials, I really appreciate you taking the time and effort to provide such quality videos. and maaan do you recommend any certain resources to learn these stuffs from (Links, people, articles books... anything really), I am eager to learn and super curious and I really want to get better at this, and the way you do it seems like the right path, your designs look clean, beautiful and straight forwrard, and also there are plenty of trash content out there (turns out everyone nowadays knows what looks "good" and what doesn't uploads tutorials about designing websites and coding them.. bluh!). Thanks again man you are awesome!!!
@WrongAkram
@WrongAkram 5 жыл бұрын
Hey man, I really appreciate the comment! It all depends on what you want to be good at. I always recommend front end developers to learn design because that skill makes you stand out as a developer. For design I recommend going through dribbble and picking what you think looks good and write down why that is. Copying high quality work for the sake of practicing is a great way to increase your skill set. Medium articles are awesome also. For react videos one of my favorite KZbinrs is benawad. I want to make entire courses but it will take some more time.
@jessejburton
@jessejburton 4 жыл бұрын
Great tutorial! Super helpful :) Thanks.
@LordBoltagon
@LordBoltagon 3 жыл бұрын
This is really cool. Thank you
@frostkhan2629
@frostkhan2629 3 жыл бұрын
Keep going, it seems you are not making videos anymore ...
@warodomlertthaweedech9059
@warodomlertthaweedech9059 4 жыл бұрын
nice work wait for next animation
@danieldante8341
@danieldante8341 4 жыл бұрын
Amazing bro! thank you! 👏🤘
@sikfreeze
@sikfreeze 4 жыл бұрын
This is really useful. Thank you for making all these great contents. Can't believe it took me this long to find your channel. Wondering if you can make tutorials on canvas Drag and Drops. For example, drag a thumbnail from the toolbar and drop in the middle of the screen to become a fully interactive widget that can be dragged around or something like that. It's so hard to find decent tutorials on the topic. Hope you consider, looking forward to it.
@sai_charan
@sai_charan 4 жыл бұрын
Thank you, Akram!
@RizwanAhmed-pe2qq
@RizwanAhmed-pe2qq 5 жыл бұрын
AWESOME! Please do react-spring next.
@WrongAkram
@WrongAkram 5 жыл бұрын
Thanks! On my radar!
@tradelikemo4771
@tradelikemo4771 5 жыл бұрын
I'm sponsored by ghost. This is dope
@WrongAkram
@WrongAkram 5 жыл бұрын
LOL
@alexlytle089
@alexlytle089 3 жыл бұрын
Excellent tutorial
@ogulcankarayel5625
@ogulcankarayel5625 4 жыл бұрын
Tutorial about react and next js would be perfect.
@WrongAkram
@WrongAkram 4 жыл бұрын
Keep an eye out!
@ramin9134
@ramin9134 2 жыл бұрын
that was amazing dude
@PaulGrieselhuber
@PaulGrieselhuber 4 жыл бұрын
That typing effect in your terminal is amazing. How did you pull that off?
@sugamthapa8616
@sugamthapa8616 3 жыл бұрын
It's using hyper terminal. It's a plugin called hyperpower
@nguyenminhtuan2632
@nguyenminhtuan2632 3 жыл бұрын
@@sugamthapa8616 thank you so much, waiting for an answer so long 🥰
@dimak7745
@dimak7745 4 жыл бұрын
this is gold, thank you
@WrongAkram
@WrongAkram 4 жыл бұрын
Appreciate it!
@acloudonthebluestsky9687
@acloudonthebluestsky9687 4 жыл бұрын
BRO, LOVE U MAN
@amirThePiper
@amirThePiper 2 жыл бұрын
In 2022 what animation library would you use with react/next? Thanks for the tutorial.
@Ayush_1908
@Ayush_1908 4 жыл бұрын
Undoubtedly premium content mahn!
@WrongAkram
@WrongAkram 4 жыл бұрын
Wow thanks!
@MashaoleMogale
@MashaoleMogale 2 жыл бұрын
Do you have a video on Nextjs and gsap page transitions ?
@abe10
@abe10 3 жыл бұрын
Don't forget to add key to the Component inside _app. The animations won't work otherwise.
@salmankr2d2
@salmankr2d2 3 жыл бұрын
Man thanks so so so much, i have been hitting my head for the past 4 hours trying to make the animations work, and this was the solution👍
@ibeeliot
@ibeeliot 4 жыл бұрын
Dudee..... a nextjs portfolio tutorial with a headless CMS & deployment...!? ooooooof make that please?
@ade-joshe
@ade-joshe 4 жыл бұрын
Good job bro...
@WrongAkram
@WrongAkram 4 жыл бұрын
Thank you so much! 🙏🏽
@duckhorse2563
@duckhorse2563 4 жыл бұрын
Thank you so much.
@benfrese3573
@benfrese3573 4 жыл бұрын
Thanks, subbed.
@philsecure.comadmin1678
@philsecure.comadmin1678 4 жыл бұрын
Automatic sub! Great content!
@WrongAkram
@WrongAkram 4 жыл бұрын
Much appreciated!
@OdotJdot
@OdotJdot 4 жыл бұрын
THANK. YOU.
@Rom_Over
@Rom_Over 4 жыл бұрын
Thank you very much for bringing this kind of tutorial! it is very difficult to find elsewhere ... even paying! Very good job, man. I have a question, Is it possible to use Gsap with Next? Is it the samle way as React? I don't know if we can use timeline with only Framer ..
@WrongAkram
@WrongAkram 4 жыл бұрын
Yay! Glad you enjoyed it. GSAP should plug in to next.js similarly to how it does with create-react-app.
@husainahmmed9025
@husainahmmed9025 5 жыл бұрын
Awesome tutorial
@WrongAkram
@WrongAkram 5 жыл бұрын
Thanks 😊
@reactivicky
@reactivicky 3 жыл бұрын
The first image is missing in starter files.Other than that, Amazing tutorial. Thank you
@fsr_bu
@fsr_bu 4 жыл бұрын
Wooowww this is sooo dope!
@WrongAkram
@WrongAkram 4 жыл бұрын
Glad you think so!
@codawong
@codawong 4 жыл бұрын
Dear Akram, as your this project. Can use "+ - stepper" to change the money value in Framer?
@ks-op8pe
@ks-op8pe 4 жыл бұрын
👏👏👏
@Laughatyouhaha
@Laughatyouhaha 4 жыл бұрын
Could you provide a bit of information about how you setup _app.js? I am confused about where was the router imported from.
@svampefett
@svampefett 4 жыл бұрын
What is that terminal writing effect? Looks awesome :D
@WrongAkram
@WrongAkram 4 жыл бұрын
The terminal is hyper and the plugin for the effect it hyperpower.
@thymarques
@thymarques 2 жыл бұрын
it is possible to create an API in the nextjs, a dummy API (in the project) just to fetch the dummy data.
@jeresalem
@jeresalem 4 жыл бұрын
Thanks for this! However, when using dynamic routes the `router.route` is not unique to the URL's, which is necessary in `_app.js`. Using `router.asPath` should do the trick.
@ruuman4
@ruuman4 2 жыл бұрын
the stagger property is not working with the latest version of framer motion. I've fixed a few bugs but I can't figure out why its not working.
@yossiyun
@yossiyun 2 жыл бұрын
Danke🙏🏽
@dgzv8360
@dgzv8360 3 жыл бұрын
What about not scrolling to the top of the page while changing the route? Now if click previous arrow, it scroll a page to the top during transitioning out.
@acloudonthebluestsky9687
@acloudonthebluestsky9687 4 жыл бұрын
so basically u need to style each page right ?
@TheNomanAhmed
@TheNomanAhmed 5 жыл бұрын
Hello bro, Can you share what kind of Microphone and screen capture you are using to create your videos and for editing?
@WrongAkram
@WrongAkram 5 жыл бұрын
I use obs to screen record and a blue yeti for my mic. I edit in adobe premiere.
@code3144
@code3144 4 жыл бұрын
thanks!
@samydjemai927
@samydjemai927 4 жыл бұрын
Hi ! Can't get the exit working... Even with . Some help ?
@FrancescoBaldan
@FrancescoBaldan 4 жыл бұрын
Same problem, did you find a solution?
@vrtech473
@vrtech473 4 жыл бұрын
@Thiago Lima You are a life saver!
@PivotThom
@PivotThom 3 жыл бұрын
@Thiago Lima Thanks brother
@charbouy
@charbouy 2 жыл бұрын
this include react? can integrate with it?
@mehedihassan5184
@mehedihassan5184 4 жыл бұрын
❤️
@yousefa6091
@yousefa6091 3 жыл бұрын
you can include the json file with the project and import it as js object no need for http requests
@rofazayn
@rofazayn 4 жыл бұрын
Hi Akram, thank you for the video, I am wondering if there is possible way to use Barba.js with Next.js?
@WrongAkram
@WrongAkram 4 жыл бұрын
Mhmm... Maybe but I think barbra is really meant for vanilla js.
@_danisson
@_danisson 4 жыл бұрын
Great tutorial. But im having problem with the motion.div classNames and style jsx. If a put a motion before a div with a className it breaks my style. So im not able to put style in those motion.divs
@ThomasBurleson
@ThomasBurleson 4 жыл бұрын
Great video EXCEPT your description of the `animate="animate'" initial="initial"` usages... that part was completely confusing.
@JmDelaCruzMusic1
@JmDelaCruzMusic1 4 жыл бұрын
Bro can you make a tutorial like this for gatsby
@permanar_
@permanar_ 3 жыл бұрын
This is really awesome dude. Thanks for your efforts. We really appreciate it! Anyway, how do we wrap a tag that built-in on Next.js such as next/image (usually ) Because on your example, if there's an img or div tag, we could simply renamed it as or But what happen with above?
@wanjohi
@wanjohi 2 жыл бұрын
You should probably wrap it with an empty div with (layout="fill"). At least that's what I'd do
@maciejka1
@maciejka1 2 жыл бұрын
remember about key prop in _app!!!!
@frankand100
@frankand100 2 жыл бұрын
how to animate only viewed elements in a one page site ?
@keduslejiyared8701
@keduslejiyared8701 4 жыл бұрын
How do that cool effect thing in ur terminal when u type?
@bernatpericas9746
@bernatpericas9746 4 жыл бұрын
The terminal is hyper and the plugin for the effect it hyperpower.
@hamed4451
@hamed4451 4 жыл бұрын
Hey dude, it was greate , But i have a question, after i use framer, my pages, load data very slow , however after page load i go to pages , if i go back, thr prev page load data again very slow , if i go back to the page it will be slow( however data has been fetched in first time) Why?
@andreacappuccio58
@andreacappuccio58 4 жыл бұрын
Does this happen in production too? If it only happens in your local enviroment with NextJS don't worry, it's because it's rebuilding pages in real time.
@naynyamish270
@naynyamish270 5 жыл бұрын
Instead of rewriting each element (div, h1, p) , you could wrap all the elements in a div
@WrongAkram
@WrongAkram 5 жыл бұрын
That’s true but that wouldn’t give it that stagger effect. It would just be a single fadeInUp effect on the entire div.
@naynyamish270
@naynyamish270 5 жыл бұрын
@@WrongAkram i see it now, thank you, have a good day to you
@dgzv8360
@dgzv8360 4 жыл бұрын
cool, but is there option that if we click on link to transition to other page, we dont want to scroll up previous page. Like if i click "Privacy policy" on Home I dont want Home to be scrolled up and then transitioned to Privacy policy
@WrongAkram
@WrongAkram 4 жыл бұрын
I know with CSR you can easily preserve your scroll on page transitions but I never tried it with SSR :(
@ahmedmaher1482
@ahmedmaher1482 5 жыл бұрын
so something i dont get it why you set initial='initial' and animate='animate' when you dont want to use them? cant u just remove them?
@WrongAkram
@WrongAkram 5 жыл бұрын
Oh I do use them but for the children, the dom node that use the variants. You can name them what ever you want in our case we kept them the same name. If you remove them then it would break.
@ahmedmaher1482
@ahmedmaher1482 5 жыл бұрын
@@WrongAkram oh I got it now hahaha thanks
@tanny3080
@tanny3080 4 жыл бұрын
I cloned your project but after typing npm run dev it said 'next' is not recognized as an internal or external command, operable program or batch file.' I'm a beginner T-T
@Manu9325066048
@Manu9325066048 4 жыл бұрын
look up nextjs
@SH-lt2iv
@SH-lt2iv 2 жыл бұрын
16:32
@itsonlyher
@itsonlyher 3 жыл бұрын
Hello I had issues with `npm run dev` the starter files. I got a "sh: next: command not found". Instead I had to create a blank nextjs project and move what I can of the starter code into the blank project. Did anyone encounter something similar please? Also tried `npm install` just in case. I'm on node v14.16.0 .
@tuanauduong
@tuanauduong 4 жыл бұрын
How to avoid unexpected scroll-to-top when exit using AnimatePresence, I'm using GatsbyJs and framer-motion :'(
@arako4988
@arako4988 4 жыл бұрын
same issue. Did you find a way to fix this?
@oscar_cornejo
@oscar_cornejo 4 жыл бұрын
Hi, can I follow this tutorial without applying Next.js?
@WrongAkram
@WrongAkram 4 жыл бұрын
Yep! You would just have to change a few things depending on how your routes are set up. You can do it with react router with ease or even gatsby link. The AnimatePresence allows for exit animations for when your components unmounts.
@SowedCastelli
@SowedCastelli 4 жыл бұрын
Did anyone notice that *exitBeforeEnter* breaks routing with IDs in the page?
@WrongAkram
@WrongAkram 4 жыл бұрын
Mhmmm.... What happens exactly?
@SowedCastelli
@SowedCastelli 4 жыл бұрын
@@WrongAkram Navigating to an item from another page say on the home page and clicking on a link to href="/about#the-team", the page couldn't go to the element with id="team". However I fixed it using *onExitComplete* and passed it a callback to that gets the hash from the url and scrolls to it
@bags534
@bags534 3 жыл бұрын
I love your videos; you hit a very unique market gap and do it with great quality. But you got to be more concise man. The first 3 minutes of this video for example, Could’ve been said in 20 seconds. I think you lose viewers especially because 10-20 Minute videos look way less intimidating, so one is more likely to click. Otherwise keep em coming !!
@kadekeqw23
@kadekeqw23 4 жыл бұрын
TBH functionality is just like GSAP but with updated syntax and structure LOL
The Easy Way to Design Top Tier Websites
11:54
Sajid
Рет қаралды 673 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Framer Motion Animate When In View
15:12
DEVAMS01
Рет қаралды 57 М.
How NextJS REALLY Works
28:25
Theo - t3․gg
Рет қаралды 157 М.
9 Web Design Trends 2025 to Spruce Up Your Site
16:33
Showit
Рет қаралды 70 М.
Reviewing Subscribers Portfolios #2
47:09
Akram
Рет қаралды 14 М.
I Redesigned the ENTIRE Steam UI from Scratch
20:34
Juxtopposed
Рет қаралды 898 М.
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 6 МЛН
Server vs client components in NextJs 13 - When to use which
34:07
Hamed Bahram
Рет қаралды 35 М.
My Top 5 Techniques for Web Animation
9:58
Olivier Larose
Рет қаралды 119 М.
How to Learn to Code FAST (Do This or Keep Struggling)
11:00
Andy Sterkowitz
Рет қаралды 724 М.
The Easiest Way to Build Websites
10:56
Sajid
Рет қаралды 685 М.