View Transitions API — native JS API for smooth animations between DOM states. document.startViewTransition() snapshots the old state → applies changes → animates the transition via CSS. Chrome 111+ (same-document), 126+ (cross-document). Framework-agnostic, with React Router and Next.js integrations already available.
Below: details, example, related terms, FAQ.
// Plain JS — SPA page switch
function navigate(url) {
if (!document.startViewTransition) return render(url);
document.startViewTransition(() => render(url));
}
// CSS custom animation
@keyframes fade-in { from { opacity: 0; } }
::view-transition-new(root) {
animation: fade-in 0.3s ease;
}For simple page transitions — yes. For complex interactive animations (drag, spring physics) — Framer Motion / GSAP are better.
Technology Preview 208 (2025) has same-document. Production Safari — not yet. Firefox — also WIP.
Same-document: no impact (SPA routing). Cross-document: native navigation, crawlers see regular navigation.