Agent Skill
React View Transitions (Vercel)
Adds React's ViewTransition animations to an app in a fixed order: audit every route and Suspense boundary, then shared elements, reveals, lists and routes.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkInstall
Commands are pinned to commit 5a37a63, the version we read, wherever the install method supports it.
npx skills
npx skills add vercel-labs/agent-skills@5a37a6329fbad3666c3207392a6a7c0110e92efb --skill vercel-react-view-transitions -a claude-codeCopies the skill into .claude/skills/ in this project, pinned to the reviewed commit.
npx skills
npx skills add vercel-labs/agent-skills@5a37a6329fbad3666c3207392a6a7c0110e92efb --skill vercel-react-view-transitions -a codexInstalls to .agents/skills/, which Codex scans from the working directory up to the repo root.
npx skills
npx skills add vercel-labs/agent-skills@5a37a6329fbad3666c3207392a6a7c0110e92efb --skill vercel-react-view-transitions -a cursorInstalls to .agents/skills/, one of the folders Cursor reads skills from.
gh skill
gh skill install vercel-labs/agent-skills skills/react-view-transitions --pin 5a37a6329fbad3666c3207392a6a7c0110e92efb --agent github-copilotNeeds GitHub CLI 2.90.0 or later. The folder is react-view-transitions although the skill's name is vercel-react-view-transitions. Use --scope user to install for every repository.
npx skills
npx skills add vercel-labs/agent-skills@5a37a6329fbad3666c3207392a6a7c0110e92efb --skill vercel-react-view-transitionsPinned to the commit we reviewed. The CLI asks which agents to install for; add -g to install for your user instead of this project.
What it does
It teaches the agent React’s own view transition API and then makes it follow a set order of work. You declare what animates with the ViewTransition component, React triggers it when an update runs inside startTransition, useDeferredValue or Suspense, and CSS classes on the ::view-transition-* pseudo-elements control how it looks. addTransitionType tags a transition (nav-forward, nav-back) so the same element can slide one way on the way in and the other on the way back.
Before writing code the agent audits the app: every Link and router.push, every Suspense boundary, every page, persistent headers and sidebars, and elements that appear on both a list and its detail page. It produces a navigation map, then implements patterns in priority order: shared elements, Suspense reveals, list identity, enter and exit, and route changes last. Directional slides are kept for list-to-detail and next/previous navigation; tab-to-tab gets a cross-fade or nothing. Reduced-motion CSS goes in the global stylesheet every time.
When to use it
You are on React 19.3 or later, or the Next.js App Router, and want navigation, list reorders or loading states to animate without adding Framer Motion or another library. React 19.3, released on 9 September 2026, made ViewTransition stable; before that it was canary-only. The skill earns its place on the details agents get wrong from memory: a ViewTransition only animates enter and exit when no DOM element wraps it, plain setState never animates, a layout-level wrapper around {children} silently stops page-level enter and exit, and Next.js projects must not install react@canary on top of the version Next bundles.
When to skip it
On a multi-page site that is not a React single-page app (Astro, Rails, plain HTML): cross-document view transitions need only CSS, an @view-transition { navigation: auto; } rule plus view-transition-name on shared elements, and no React at all. Skip it on React 19.2 or earlier outside Next.js, where the API does not exist in stable React, and in React Native, where ViewTransition does not run yet. And be wary of the “implement all applicable patterns” instruction on a product where motion is not wanted; tell the agent which patterns you want.
Try it
Add view transitions to our Next.js shop: product cards in
app/products/page.tsx should morph into the hero image on
app/products/[id]/page.tsx, going back should slide the other way,
and the reviews Suspense boundary should slide up when it loads.
What it can touch
- Bundles scripts
- No
- Pre-approved tools
- See source
- Needs
- React 19.3 or later, or a Next.js App Router project
- Client-specific fields
- None, spec fields only
Its instructions steer what your agent does, and it may have changed since the commit we read. How to check a skill.
Instructions only: no scripts, no allowed-tools. The agent edits your components, and adds CSS to your global stylesheet. In Next.js it is told not to add the old experimental.viewTransition flag or install react@canary; transitionTypes on next/link needs Next.js 16.2.0 or later, with a startTransition fallback for older versions. metadata carries author and version, which is where extra keys belong, so nothing is non-portable. The repository has no top-level licence file that GitHub detects; the SKILL.md declares MIT.
At commit 5a37a63 the SKILL.md is 332 lines long. Alongside it:
references/(5 entries):implementation.md(the step-by-step audit and build order),patterns.md(real-world patterns and the events API for Web Animations),css-recipes.md(fade, slide, scale, directional navigation and the reduced-motion block),nextjs.md(transitionTypesonnext/link, App Router layout rules) andtroubleshooting.md(symptom-first fixes, such as a shared morph that never fires).AGENTS.md: the SKILL.md and all references compiled into one 1,380-line file, for agents that read a single document.README.md: a human overview and install line.metadata.json: version 1.0.0 dated March 2026, and links to the React and Next.js docs it was written from.
Outline of the SKILL.md
We have not reproduced this SKILL.md here: it is 332 lines, most of them JSX and CSS examples, and it reads better at the source; it is MIT-licensed, so you are free to read and copy it there. Its sections at the reviewed commit:
- When to Animate (the five patterns in priority order, and choosing an animation style)
- Availability (Next.js, React 19.3 and browser support)
- Implementation Workflow
- Core Concepts (the component, animation triggers, the placement rule)
- Styling with View Transition Classes
- Transition Types (including
router.back(), Suspense and shared element readiness) - Shared Element Transitions
- Common Patterns (enter and exit, list reorder, layout morphs, re-entering with
key, Suspense fallbacks) - How Multiple VTs Interact
- Next.js Integration, Accessibility, Reference Files and the Full Compiled Document
Alternatives
React best practices from the same repository covers performance rules rather than motion, and React composition patterns covers component structure. For a check that the result is still accessible, including reduced motion, run web design guidelines over the changed pages.
SKILL.md
We have not reproduced this file here; the outline above lists its sections. Read the SKILL.md on GitHub.
Related skills
React best practices (Vercel)
Vercel's React and Next.js performance rules as a skill, ranked by impact: waterfalls, bundle size, server performance, data fetching and re-renders.
React composition patterns (Vercel)
Vercel's rules for refactoring React components away from boolean-prop sprawl toward compound components, explicit variants and the React 19 APIs.
Web design guidelines (Vercel)
Reviews UI files against Vercel's Web Interface Guidelines, which the agent downloads fresh from GitHub before each review. Reports file:line findings.