react-view-transitions

Implement native view transition animations in React and Next.js applications.

2|Updated Jul 25, 2026
One-click install
npx skills add https://github.com/ankaboot-source/boucle --skill react-view-transitions-ankaboot-source
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-view-transitions
Source: https://github.com/ankaboot-source/boucle/tree/main/.jcode/skills/react-view-transitions
Command: npx skills add https://github.com/ankaboot-source/boucle --skill react-view-transitions-ankaboot-source

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adding smooth, native-feeling animations between UI states in React is error-prone: developers misuse the View Transition API, write fragile custom CSS, and hit silent failures like morphs that never fire or nested transitions that never animate. This Skill provides a structured implementation workflow, ready-to-use CSS recipes, and troubleshooting guidance for React's <ViewTransition> component. ## Core Features & Use Cases - Step-by-step implementation workflow: Audit navigation paths, isolate persistent elements, add directional page transitions, Suspense reveals, and shared element morphs in the correct order. - Ready-to-use CSS recipes: Copy-paste animations for fades, directional slides, shared element morphs, text morphs, tab indicators, and reduced-motion accessibility. - Next.js integration guidance: Covers the experimental.viewTransition flag, transitionTypes on next/link, loading.tsx boundaries, and same-route dynamic segment transitions. - Use Case: You are building a photo gallery in Next.js where clicking a thumbnail should morph the image into the detail page with a directional slide. This Skill walks you through tagging the navigation with addTransitionType, wiring named <ViewTransition> pairs, and applying the morph CSS recipe. ## Quick Start Use the react-view-transitions skill to add a directional slide transition and shared element morph between my list page and detail page in Next.js.

Frequently Asked Questions about react-view-transitions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add page transition animations in React?

Wrap page components in the ViewTransition component and trigger state updates inside startTransition, useDeferredValue, or Suspense. Use enter and exit props with CSS classes targeting ::view-transition-old and ::view-transition-new pseudo-elements to control the animation style.

How do I create shared element transitions between routes in Next.js?

Give two ViewTransition components the same unique name prop on the source and target views, and set the share prop to a morph class. The target element must be in the DOM at navigation time for the pair to form, so prefetch or cache its data.

Does ViewTransition work with Next.js App Router?

Yes, ViewTransition works out of the box in the Next.js App Router because it bundles React canary internally. Enable the experimental.viewTransition flag in next.config.js and use the transitionTypes prop on next/link for typed directional animations.

Why is my React view transition not animating?

Common causes include the state update not being wrapped in startTransition, a DOM node wrapping the ViewTransition which suppresses enter/exit, or default="none" blocking the trigger you want. Named shared elements also fail silently if the navigation never adds the required transition type.

Which browsers support the React View Transition API?

React view transitions require Chromium 125 or later, Firefox 144 or later, or Safari 18.2 or later, since React needs the v2 object form of startViewTransition. Unsupported browsers skip the animations gracefully with no errors.

When should I not use directional slide animations?

Avoid directional slides for lateral navigation such as tab-to-tab switches, since they falsely imply spatial depth. Use a bare ViewTransition cross-fade or default="none" for lateral navigation, and reserve slides for hierarchical or ordered sequences.