vercel-react-view-transitions

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

Updated May 22, 2026
One-click install
npx skills add https://github.com/viniciuscs84/sdd-toolkit --skill vercel-react-view-transitions-viniciuscs84
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-view-transitions
Source: https://github.com/viniciuscs84/sdd-toolkit/tree/main/skills/vercel-react-view-transitions
Command: npx skills add https://github.com/viniciuscs84/sdd-toolkit --skill vercel-react-view-transitions-viniciuscs84

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 the <ViewTransition> component, startTransition triggers, transition types, and CSS pseudo-elements, while avoiding common pitfalls like broken shared element morphs, layout-level VTs that silently disable page animations, and cross-fades firing on every transition. ## 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 accessibility. - 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 photo gallery where tapping a thumbnail should morph the image into a detail page with a directional slide, use this Skill to wire up named <ViewTransition> components, addTransitionType('nav-forward'), and the morph CSS recipe correctly on the first attempt. ## Quick Start Ask the AI to add directional page transitions and shared element animations to your React or Next.js app using the view transitions skill.

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 (e.g., nav-forward) and map types to CSS classes via the enter and exit props.

How to create shared element transitions between React routes?

Give two `<ViewTransition>` components the same unique `name` on the source and target views, with `share="morph"`. When one unmounts and the other mounts in the same transition, the element morphs between them.

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 links in Next.js 15+ canary or 16+.

Why is my React view transition not animating?

Common causes: the state update is not inside `startTransition`, a DOM node wraps the `<ViewTransition>` (suppressing enter/exit), or a parent layout VT blocks nested page VTs from firing. Also `router.back()` skips animations because popstate is synchronous.

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

Only outside Next.js: install `react@canary` and `react-dom@canary` since ViewTransition is not in stable React. In Next.js, do not install canary because the App Router already bundles it internally.

How do I respect prefers-reduced-motion with view transitions?

Add a media query that sets `animation-duration: 0s` on `::view-transition-old(*)`, `::view-transition-new(*)`, and `::view-transition-group(*)` when `prefers-reduced-motion: reduce` is active. The skill's CSS recipes include this block.