Using Tanstack Router Link with Framer Motion #2375
KirillTregubov
started this conversation in
General
Replies: 1 comment
-
We've recently added docs on using custom link components with TSR. You'll likely need to adapt some of it to work with framer-motion. If you run into any trouble, pop-in to our Discord. Things tend to get a bit lost over here 😅. And if it works, consider maybe adding it to the documentation 👀 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A couple months back I needed to animate a Link with Framer Motion. I have struggled with the implementation; trying both the
createLink
andLinkOptions
APIs. I think I have finally landed on a version others might find good.Note: I will simplify this when React 19 releases to remove the forwardRef.
EDIT: my method didn't work. Here's a good enough version that has the wrong ref:
I scoured the internet looking for someone else's implementation of this. Hopefully it helps! Please let me know what you think of this approach, any feedback or criticism is welcome!
Beta Was this translation helpful? Give feedback.
All reactions