vercel-react-view-transitions

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

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/RavitejaKarra24/dotfiles --skill vercel-react-view-transitions-ravitejakarra24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-view-transitions
Source: https://github.com/RavitejaKarra24/dotfiles/tree/main/agents/.agents/skills/vercel-react-view-transitions
Command: npx skills add https://github.com/RavitejaKarra24/dotfiles --skill vercel-react-view-transitions-ravitejakarra24

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 experimental.viewTransition, 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 add forward/back directional slides between list and detail pages, morph shared thumbnail images across routes, and animate skeleton-to-content reveals. ## Quick Start Ask the agent to add view transitions to your React or Next.js app, for example: add directional page transitions and a shared element morph between my product list and detail pages.

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 navigation inside startTransition. Use addTransitionType to tag direction (nav-forward or nav-back) and map types to CSS classes for directional slide animations.

How do I create shared element transitions between React routes?

Give two ViewTransition components the same name prop on the source and target views, with one unmounting and one mounting in the same transition. Names must be globally unique, so use IDs like photo-${id}.

Does ViewTransition work with Next.js App Router?

Yes, the Next.js App Router bundles React canary internally, so ViewTransition works out of the box. Enable experimental.viewTransition in next.config.js to animate Link navigations, and use the transitionTypes prop on next/link in Next.js 15 canary or 16+.

Why is my React view transition not animating?

Common causes are wrapping the ViewTransition inside a DOM node instead of placing it first, updating state outside startTransition, or nesting page VTs inside a layout VT. Also check that default="none" is not blocking the trigger you want.

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

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

Do I need to install react@canary to use ViewTransition?

In Next.js, no — the App Router already bundles React canary internally. Outside Next.js, you must install react@canary and react-dom@canary because ViewTransition is not yet in stable React.