vercel-react-view-transitions

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

Updated Aug 3, 2026
One-click install
npx skills add https://github.com/arfaomar/NotebookLM-Clone --skill vercel-react-view-transitions-arfaomar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-view-transitions
Source: https://github.com/arfaomar/NotebookLM-Clone/tree/main/.agents/skills/vercel-react-view-transitions
Command: npx skills add https://github.com/arfaomar/NotebookLM-Clone --skill vercel-react-view-transitions-arfaomar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adding smooth, native-feeling animations between UI states in React apps 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, 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 boundaries, and same-route dynamic segment transitions. - Use Case: When building a Next.js app with a product grid linking to detail pages, use this Skill to add directional forward/back slide transitions plus a shared element morph on product images. ## Quick Start Ask the AI 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 (e.g., nav-forward) and map types to CSS classes for enter and exit animations.

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

Enable `experimental.viewTransition` in next.config.js so `<Link>` navigations run inside startViewTransition. Use the `transitionTypes` prop on `<Link>` or `startTransition` with `addTransitionType` plus `router.push` for programmatic navigation.

Does ViewTransition work with stable React versions?

ViewTransition is not in stable React, so non-Next.js apps need react@canary and react-dom@canary. Next.js App Router bundles React canary internally, so it works out of the box without installing canary packages.

Why is my ViewTransition enter or exit animation not firing?

Common causes include wrapping the ViewTransition inside a DOM node instead of placing it first, updating state outside startTransition, or placing the VT in a layout that persists across navigations. Nested VTs inside a parent VT also never fire their own enter/exit.

How do shared element transitions work between two pages?

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

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 instead.