DEV Community

Discussion on: Page Transition Effect in NextJS

Collapse
 
nizardaou96 profile image
Nizar Daou

Very cool idea! I am trying to implement it in one of the websites. However, one problem is that no matter how much you scroll in the page, the fade out transition will occur at the top of the page when changing routes. Do you think there is a way to fade out from the current scroll position?

Collapse
 
anxiny profile image
Anxiny

Thanks for replying. I will try to take a look.

Collapse
 
anxiny profile image
Anxiny

I have updated my codesandbox example.
You can set a height for the div that contains the content from different page, and set the overflow to auto.

Hope this will help your problem.
Thanks