T
TanStack2mo ago
stormy-gold

Scoped view transitions

I couldn't find any threads discussing this, so I wanted to ask what (if any) are the plans with scoped view transitions: https://developer.chrome.com/blog/scoped-view-transitions-feedback I've recently migrated my personal application from motion -> view transitions, and the immediate problem I have is that view transitions block the entire page - making navigation or cancellation of a transition impossible. Scoped view transitions should solve this by allowing the browser to only animate a particular sub tree of the browser. In my opinion, the router is a fantastic place for this, because each outlet effectively acts as a transition boundary. This would mean that when changing routes, that retain a shared parent route, only that sub-document needs to be transitioned, rather than the entire page - keeping navigation responsive, and providing better cross page transitions. With all this in mind, It's currently behind a flag in chrome 140, so it's still early days, but I'm curious if any thought has been given to what that API would look like from the router perspective? There could likely be very little work, and it simply automatically behaves as I described above, but I'm sure there are edge cases or considerations for supporting that.
Chrome for Developers
Ready for developer testing: Scoped view transitions  |  Blog  |...
Help us build the next iteration of View Transitions
3 Replies
metropolitan-bronze
metropolitan-bronze5w ago
but I'm curious if any thought has been given to what that API would look like from the router perspective
we have not looked into that. any input is highly appreciated here!
stormy-gold
stormy-goldOP5w ago
Great, I'll see if I can create a discussion post on Github with some ideas when I get home tonight.
stormy-gold
stormy-goldOP5w ago
I've created a discussion for this here: https://github.com/TanStack/router/discussions/5670 I'm sure I'm missing tons of edge cases, but figure I can just put the general idea out there for more discussion. I don't expect this is something that needs to be implemented any time soon realistically, since it's not even directly available without enabling a flag in browsers.
GitHub
Element View Transition API · TanStack router · Discussion #5670
Summary I wanted to create a document/discussion for how tanstack router might implement an API to support element level view transitions. The motivation behind this is the recent implementation an...

Did you find this page helpful?