React view transitions

Implements animations with React's View Transition API: shared element morphs, Suspense reveals, list reorder and directional route slides, with CSS recipes and Next.js integration. Use when adding page or state transitions to a React or Next.js app.

CodingPack: Vercel skillslinkreact-view-transitions
Author
Source
vercel-labs/agent-skills/skills/react-view-transitions @ 1a2c79d
License
MIT

About this skill

What it does

The skill teaches the agent React's View Transition API, the browser's document.startViewTransition driven by React. <ViewTransition> declares what animates; startTransition, useDeferredValue or Suspense decide when (a plain setState does not animate); CSS classes on the ::view-transition-* pseudo-elements decide how.

It ranks five patterns and asks for every one the app has a use for: shared element morphs by name, Suspense reveals, list identity by key, enter and exit, route changes. Directional slides, tagged with addTransitionType, are kept for list-to-detail navigation and ordered sequences; tab-to-tab gets a fade or nothing. Key rules: a <ViewTransition> must come before any DOM node to animate enter and exit, default="none" stops stray cross-fades but also turns off update and share, names must be unique, and router.back() carries no transition types.

references/ does the work: implementation.md is a seven-step order that starts with an audit of every <Link>, router.push, Suspense boundary, page and persistent header, builds a navigation map and ends by checking each path; css-recipes.md holds fade, slide, scale and reduced-motion CSS; patterns.md covers timing and the events API; troubleshooting.md maps symptoms to causes; nextjs.md covers transitionTypes on next/link.

When to use it, and when not

Use it for page transitions, list-to-detail morphs, list reorder and skeleton-to-content reveals. Next.js App Router has the API in its bundled React canary, and the skill warns against installing react@canary; elsewhere it needs React 19.3 or newer. Browsers: Chromium 125+, Firefox 144+, Safari 18.2+; others skip the animation.

It does not apply to older React or to animations built with a third-party library. Since it asks for every applicable pattern, say so when you want just one.

How to run it

We do not copy this skill: its frontmatter says MIT, but the repository ships no licence text to put beside a copy. Install it from Vercel's repository with the button to the source; the skill's README gives npx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-view-transitions. Its name is vercel-react-view-transitions:

  • Claude Code: /vercel-react-view-transitions, or ask for the skill by name.
  • Codex: $vercel-react-view-transitions.
  • Cursor: type / in the Agent chat and pick vercel-react-view-transitions.

Example: /vercel-react-view-transitions Make the product thumbnail morph into the hero image on /products/[id], with a slide back.

How it differs from similar skills

No other skill in the catalog covers this API. Distinctive frontend design decides where motion belongs, not how to build it. Web Interface Guidelines review flags animations without prefers-reduced-motion. React Native best practices covers mobile animation.

Install

This skill is not copied to the catalog: the author's repository has no licence text. Install it from there.

Open the source

Connect through AnyModel API

This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.

More from the pack Vercel skills

React and Next.js performance rules

Gives the agent Vercel's 70 React and Next.js performance rules, ranked by impact: request waterfalls, bundle size, server work, re-renders, rendering. Use when writing, refactoring or reviewing React or Next.js code for speed.

React composition patterns

Applies eight Vercel rules that replace boolean props with compound components, provider-held state and explicit variants, plus React 19 ref and use() changes. Use when a component has too many flags or when designing a component library.

React Native best practices

Applies Vercel's React Native and Expo rules: virtualized lists, transform and opacity animations, native navigators, expo-image, state, monorepo setup. Use when building or speeding up a mobile app or reviewing React Native code.

Deploy to Vercel, Vercel Labs

Deploys a project to Vercel as a preview, choosing git push, CLI deploy, linking first or a temporary deploy without an account by the project's state, and returns the URL. Use when asked to deploy an app and get a link.

Vercel CLI with tokens

Runs the Vercel CLI from an access token instead of a browser login: finds the token, deploys previews, manages env vars, logs and domains, keeps the token out of command flags. Use when working with Vercel from a non-interactive shell.

Vercel cost and performance tuning

Audits a deployed Vercel project for cost and performance: collects metrics first, picks candidates by fixed thresholds, inspects only flagged routes and returns verified, cited recommendations. Use when cutting a Vercel bill or fixing slow routes.

Web Interface Guidelines review

Reviews UI code against Vercel's Web Interface Guidelines, fetched fresh on each run, and lists findings as file:line: accessibility, focus, forms, animation, typography, images, performance. Use when checking components or pages before a pull request.

Writing Guidelines review

Reviews docs and prose against Vercel's writing handbook, fetched fresh on each run, and lists findings as file:line: voice, structure, headings, code samples, units, typography. Use when checking English docs before publishing.