View Transitions API
A browser API that animates between two states of a page: it captures the old view, lets you update the DOM, then animates to the new view.
In more detail
document.startViewTransition(() => updateDom()) takes snapshots before and after the update and cross-fades them by default. Elements with the same view-transition-name in both states are morphed smoothly between their old and new position and size.
Related terms
- view-transition-name — The CSS property that gives an element a unique name so the View Transitions API can animate it from its old state to its new one.
- FLIP animation technique — An animation trick: record an element's first position, move it to its last position, invert the difference with a transform, then play the transform back to zero.
- CSS animation — Changing an element's styles smoothly over time using @keyframes and the animation property, without JavaScript.
Taught in
- Modern CSS Animations, Transitions And View Transitions API — Frontend Architecture & Web Platform