How it works
flushSync inside startViewTransition so React commits the DOM change synchronously; shared elements get matching view-transition-name.
Gallery → detail morph using document.startViewTransition and view-transition-name.
flushSync inside startViewTransition so React commits the DOM change synchronously; shared elements get matching view-transition-name.
The browser snapshots old/new states and animates them on the compositor. Zero JS animation libraries.
Unsupported browsers get an instant swap. Reduced mode disables it via @media (prefers-reduced-motion).
transition={{ duration: 0.45, ease: [0.2, 0.8, 0.2, 1] }}