Loading video...

Video Failed to Load

Go Home

A really cool feature of the View Transitions API (available now in stable Chrome!) is that videos and animations on the new view continue to play smoothly while transitioning. With a bit of extra JavaScript, you can even do this with elements shared across different routes ✨

351,273 views • 3 years ago •via X (Twitter)

10 Comments

Maxi Ferreira's profile picture
Maxi Ferreira3 years ago

Like previous demos, this is an @astrodotbuild site using the Navigation API as a client-side router. On non-Chrome browsers it works as a regular MPA. Demo and source 👉🏽 Big thanks to @jaffathecake for the tip on how to do the smooth video transition.

Maxi Ferreira's profile picture
Maxi Ferreira3 years ago

Full credits for the UI go to designer Ehsan Rahimi 🙏 Their wonderful Dribbble shot was what inspired this demo

Jake Archibald's profile picture
Jake Archibald3 years ago

For folks following along, here's how to do it:

Joe Previte's profile picture
Joe Previte3 years ago

holy cow, this is so smooth! is this repo open source?

Maxi Ferreira's profile picture
Maxi Ferreira3 years ago

Yes! You can play with the demo here as well (need to use latest Chrome)

Jake Ruesink's profile picture
Jake Ruesink3 years ago

Would be really cool to see a demo video of how this API works. @wesbos or @stolinski maybe? Or a good segment for @syntaxfm at least. Who else does good demos that should see this?

Steren's profile picture
Steren3 years ago

Wow, I thought the View Transition API was allowing to manipulate a *static screenshot* of the old and new view. But it's actually not static? Game changer.

Una 🇺🇦's profile picture
Una 🇺🇦3 years ago

Nice demo!

Maxi Ferreira's profile picture
Maxi Ferreira3 years ago

Thanks, Una! 🙌🏽

Ben Holmes's profile picture
Ben Holmes3 years ago

Your view transition demos keep getting cooler 😮

Related Videos