vercel-react-view-transitions

Implements React View Transition API animations for route changes, shared elements, and Suspense reveals.

Updated Aug 6, 2026
One-click install
npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill vercel-react-view-transitions-ferrarifankid04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-view-transitions
Source: https://github.com/ferrarifankid04/ai-skills-public/tree/main/claude-code/skills/vercel-react-view-transitions
Command: npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill vercel-react-view-transitions-ferrarifankid04

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 must correctly coordinate <ViewTransition> placement, startTransition triggers, transition types, and CSS pseudo-elements, and small mistakes silently disable animations. ## Core Features & Use Cases - Step-by-step implementation workflow: Audit the app's navigation map, isolate persistent elements, add directional page transitions, Suspense reveals, and shared element morphs in a defined order. - Ready-to-use CSS recipes: Copy-paste animations for fade, slide, directional navigation, shared element morph, text morph, scale, and reduced-motion support. - Next.js integration guidance: Covers the experimental.viewTransition flag, the transitionTypes prop on next/link, loading.tsx Suspense boundaries, and same-route dynamic segment transitions. - Use Case: When building a Next.js photo gallery, use this Skill to animate list-to-detail navigation with a shared image morph, directional forward/back slides, and skeleton-to-content reveals. ## Quick Start Ask the agent to add view transitions to your React or Next.js app, starting with an audit of all links, Suspense boundaries, and shared visual elements.

Frequently Asked Questions about vercel-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 React ViewTransition component and trigger updates inside startTransition, useDeferredValue, or Suspense. Control the animation with enter, exit, and share props mapped to CSS classes targeting ::view-transition-old and ::view-transition-new pseudo-elements.

How do I animate route changes in Next.js App Router?

Enable experimental.viewTransition in next.config.js so Link navigations run inside startViewTransition, then use the transitionTypes prop on next/link to tag direction. Wrap each page component, not the layout, in a type-keyed ViewTransition.

Does React ViewTransition work without Next.js?

Yes, but you must install react@canary and react-dom@canary because ViewTransition is not in stable React. In Next.js the App Router already bundles React canary internally, so no extra install is needed.

Why is my ViewTransition enter or exit animation not firing?

The ViewTransition must appear before any DOM nodes in its parent, and the state update must be inside startTransition. Also check that no parent ViewTransition wraps it, since nested VTs never fire enter/exit inside an exiting parent.

Why doesn't router.back() trigger view transitions?

router.back() and browser back/forward buttons fire synchronous popstate events, which are incompatible with startViewTransition. Use router.push() with an explicit URL wrapped in startTransition and addTransitionType instead.

How do I create a shared element transition between two pages?

Give ViewTransition components on both the source and target views the same globally unique name, such as photo-${id}, and set share="morph". When one unmounts and the other mounts in the same transition, the element morphs between views.