WordPress View Transitions API: Smooth MPA Page Navigation Without Headless React
1. Why Agencies Used to Abandon Native WordPress for Smooth Transitions
For years, achieving seamless cross-page morphs—where a portfolio card thumbnail expands smoothly into the full-width case study hero—meant installing heavy SPA hijackers like Barba.js or rebuilding the entire WordPress site as a headless Next.js frontend. Both choices carried severe maintenance costs: third-party plugin scripts broke on AJAX navigation, scroll restoration glitched, and Google Analytics pageviews required manual hooks.
In 2026, Chromium and Safari support native Cross-Document View Transitions (@view-transition { navigation: auto; }) directly on standard multi-page WordPress PHP responses. Zero JavaScript hijackers, zero broken browser history, and full compatibility with Cloudflare edge caching.

@view-transition {
navigation: auto;
}
/* Match card thumbnail & single hero with identical view-transition-name */
.work-card--item-42 { view-transition-name: work-thumb-42; }
2. Avoiding Flash of Unstyled Content During Cross-Document Transitions
For cross-document transitions to feel crisp, both the outgoing and incoming WordPress pages must share consistent critical CSS and render fast enough that the browser does not stall mid-morph. Keep your theme stylesheet lean, avoid render-blocking external fonts, and pair @view-transition with Speculation Rules prefetching on link hover.
3. Handling Scroll Position, Sticky Headers & Browser Compatibility
When using @view-transition { navigation: auto; }, assign a dedicated view-transition-name: site-header; to your sticky navigation bar so the header stays anchored smoothly in place while the page body cross-fades beneath it.
Browsers that do not yet support cross-document view transitions (such as older Firefox releases) simply ignore the at-rule and perform an instant standard navigation—making this one of the cleanest progressive enhancements available in modern WordPress engineering.
FAQ — Does View Transitions work with Cloudflare caching? Yes, because every navigation remains a standard HTTP GET request returning cached HTML.
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: 180ms ease-out both fadeOut; }
::view-transition-new(root) { animation: 240ms ease-in both fadeIn; }