One of the quiet reasons teams turned simple content sites into single-page apps was this: "we don't want the page to flash white". The price was usually a few hundred kilobytes of JavaScript, a custom router, client-side state management and a long tail of strange bugs in the back button. The View Transitions API removes that reason.
The idea in one sentence
The browser snapshots the current page, applies your DOM change, snapshots the new state, and animates between the two. You only declare which elements are "the same element" across states; the browser works out the motion.
Single-page mode
The simplest form wraps a state change in document.startViewTransition(). Anything that changes inside that callback is animated. To make an element fly from one state to the next, give both versions the same view-transition-name — the article thumbnail that becomes the hero image on the article page is the canonical example.

Multi-page mode, which is the real prize
The cross-document version animates between two full navigations — two real server requests. For a blog, a shop, or any server-rendered site, that means a smooth experience with zero client-side routing code. You opt in with a CSS at-rule on both pages, not with a library.
One caveat: it only feels good when the destination responds quickly. If the next page takes a second to arrive, the animation just makes the wait more visible. View Transitions complement performance work; they do not substitute for it.
Styling the transition
A family of pseudo-elements — ::view-transition-old, ::view-transition-new and the groups around them — lets you control duration, easing and the style of the animation. The :active-view-transition pseudo-class, which became Baseline Newly available in January 2026, lets you target the document root specifically while a transition is running, which is handy for temporarily disabling an expensive effect.
Respect reduced motion
Every animation should honour prefers-reduced-motion. For users who find movement uncomfortable, collapse the transition to a very short cross-fade or to nothing at all. It is two lines of CSS and it is the difference between delightful and unusable.
When not to use it
If two views share no visual element, a transition adds latency without adding meaning. The strong cases are the ones with an obvious relationship: list to detail, gallery to lightbox, cart to checkout. Everywhere else, a 150ms fade is plenty.


