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.
react-view-transitions- Author
- Vercel
- 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 pickvercel-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.
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.
AnyModel