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

Taught in

References