Mar 2023
I played around with the super-experimental "View Transitions API for navigations" which enables CSS-only transitions between pages. This has no Javascript required whatsoever. Here's a video illustrating the effect, where I've used local overrides to add a <style>
block to a few pages of wise.com and navigated between them with regular ol' <a>
tags.
Note: This video is 25mb.
I've copy-pasted the transitions from Jake Archibald's example page so they aren't exactly right for the use case, but the possibilities are exciting. You can see in this example how the nav animates independently from the rest of the page, so as long as we use consistent naming of certain global elements there is a lot of nice design signposting we can do with animation.
This could be game changing for Wise, enabling complex transitions between microservice frontends owned by different teams. We don't have one continuous client-side JavaScript app for the whole user experience. Teams deliver their features as independent Next.js apps, so users have full HTML page loads as they move been screens of the web app. View Transitions API for navigations lets our website feel much more like an app, in a manageable and low tech debt way.
I'm excited about this but it seems to be a long way off. There's a draft spec for the View Transitions API but it seems like that's all about the JavaScript part, supporting transitions in Single-Page Apps. The "for navigations" feature flag is what makes this possible for Multi-Page Apps but it's less documented.
chrome://flags/
and search for "view transitions". Enable both viewTransition API
and viewTransition API for navigations
. Relaunch your browser.<script>
tags removed and the new transition styles added in the page head.index.html
file from the downloaded folder, changing the headline to "Dan's test page".