What problem does it solve?
View Transitions removes the jarring jump between pages by creating smooth, context-preserving animations when your React or Next.js UI navigates between states and routes.
Core Features & Use Cases
- Seamless cross-fade navigation: Orchestrates the browser View Transition lifecycle (snapshot old state, update DOM, animate old → new) for interruption-friendly transitions.
- Shared element transitions: Morph matching elements across routes using consistent
view-transition-name values to maintain visual continuity (e.g., thumbnail-to-hero).
- Directional animations: Uses
addTransitionType and data attributes to differentiate forward vs back navigation and reverse motion appropriately.
- CSS control & accessibility: Applies
::view-transition-old(...) and ::view-transition-new(...) pseudo-elements for timing and animation control, with guidance to respect reduced motion and provide fallbacks.
Quick Start
Ask your AI to implement a Next.js App Router page layout using React's ViewTransition component so route navigation animates automatically with shared elements.