IT lexicon › Web › View Transitions API

View Transitions API

Web På svenska → Updated: 2026-07-30

Browser API that photographs the page before and after a change and animates between them for you, including across a real page load.

Calling document.startViewTransition(callback) snapshots the current appearance, runs your DOM update, snapshots again and cross-fades. For anything richer you set view-transition-name on elements that should be paired — a thumbnail in a list and the same image in the detail view — and the browser morphs between the positions. The animations are controlled with plain CSS through pseudo-elements like ::view-transition-old and ::view-transition-new. The genuinely interesting part is the cross-document variant, enabled with a CSS at-rule, which gives multi-page sites the smooth transitions that were otherwise one of the strongest arguments for building everything as a single-page app.

← Back to the lexicon