Route change on a scrolled window causes jump in layout animation #3405
Unanswered
alexsafayan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In client side route changes, the router automatically scrolls the window to the top. That forced scroll repositioning moves the outgoing content in the viewport, so Framer Motion begins its animation from a suddenly shifted layout. The result is a visible jump.
Here's an example with Next.js App Router
Does anyone have any tips?
Related:
Beta Was this translation helpful? Give feedback.
All reactions