This article would benefit from an example page to show how these "feel".
back
2 comments
Here are a series of demos. They work in Chrome or Safari.
https://view-transitions.chrome.dev/
Here's an older, more designed demo that only works in Chrome.
Run this snippet from TFA in the console on GitHub:
document.startViewTransition(() => {
document.documentElement.dataset.colorMode = 'dark' // 'light'
});
Then try to update the attribute manually instead, and compare the butter-smooth transition with view transitions vs. without.