vercel-react-view-transitions

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

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/quangtuyennguyen/loan-application-workflow --skill vercel-react-view-transitions-quangtuyennguyen
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-view-transitions
Source: https://github.com/quangtuyennguyen/loan-application-workflow/tree/main/.claude/skills/vercel-react-view-transitions
Command: npx skills add https://github.com/quangtuyennguyen/loan-application-workflow --skill vercel-react-view-transitions-quangtuyennguyen

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 routes, 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 app with a list-to-detail flow, use this Skill to add directional forward/back slide animations plus a shared element morph between the thumbnail and detail image. ## Quick Start Add view transitions to my Next.js app so navigating from the product list to a product detail page slides directionally and morphs the product image.

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 with `startTransition`, `useDeferredValue`, or `Suspense`. Control animations with CSS classes targeting `::view-transition-old` and `::view-transition-new` pseudo-elements.

How to animate route changes in Next.js App Router?▼

Enable `experimental.viewTransition` in next.config.js so `<Link>` navigations run inside `document.startViewTransition`. Use the `transitionTypes` prop on `<Link>` or `startTransition` with `addTransitionType` and `router.push()` for directional animations.

Does ViewTransition require installing React canary?▼

In Next.js App Router, no — React canary is bundled internally and ViewTransition works out of the box. Without Next.js, you must install `react@canary` and `react-dom@canary` since ViewTransition is not in stable React.

Why is my ViewTransition enter or exit animation not firing?▼

Common causes include placing the `<ViewTransition>` inside a DOM node instead of before it, putting it in a layout that persists across navigations, or triggering updates with regular `setState` instead of `startTransition`. Nested VTs inside a parent VT also never fire their own enter/exit.

Why does router.back() skip view transition animations?▼

`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` to preserve the animation.

How do shared element transitions work between two React views?▼

Give two `<ViewTransition>` components the same unique `name` prop on the source and target views; when one unmounts and the other mounts in the same transition, they morph together. Names must be globally unique, and `share` takes precedence over `enter`/`exit`.