
`vercel-react-view-transitions` (part of Vercel's `vercel-labs/agent-skills` collection, 48.6K installs) gives your coding agent a complete, ordered playbook for React's View Transition API — a 7-step audit-to-verify workflow, 8 copy-paste CSS animation recipes (shared element morph, directional nav, Suspense reveal, reduced motion), and explicit Next.js App Router integration. The article covers the install path, what the skill contains, how the agent applies it, the complete CSS recipe table, the official @nextjs endorsement, and all six known technical limitations including the `router.back()` incompatibility and the React canary dependency.
<ViewTransition> silently stops working when it's not the first child, that router.back() never triggers it, and that wrapping {children} in your layout is the fastest way to turn off every page-level animation you just wrote.vercel-react-view-transitions — part of Vercel's vercel-labs/agent-skills collection — exists specifically to hand that institutional knowledge to your coding agent upfront. 1 It shipped 48,600 installs on skills.sh as of this writing, got the official @nextjs Twitter treatment (2,242 likes, 194,508 views), 2 and landed in the repo after 3 rounds of real-project testing. 3SKILL.md plus four bundled reference files: 4implementation.md — the 7-step workflow your agent must follow in ordercss-recipes.md — 8 copy-paste animation recipe groupsnextjs.md — Next.js-specific integration patterns (App Router, transitionTypes prop)patterns.md — priority order, timing guidelines, and the 10 most common mistakesAGENTS.md (32 KB) merges all of these so Claude Code, Cursor, Codex, and Gemini CLI each get the full context in one pass. MIT license, maintained by Vercel Engineering.npx skills add vercel-labs/agent-skillsvercel-labs/agent-skills collection. The skill activates automatically for any supported agent. 1// next.config.js
module.exports = {
experimental: { viewTransition: true },
};react@canary react-dom@canary first — ViewTransition has not shipped in React stable yet. 5<Link>, router.push, <Suspense> boundaries, page components, persistent UI, and elements that appear on both sides of a navigationcss-recipes.md set into your global stylesheet; the skill explicitly says not to hand-write animation CSSviewTransitionName to navbar, header, search bar; add animation: none in CSS so they don't slide with the page<ViewTransition> via transitionTypes on <Link> (Next.js 15+ canary / 16+) or programmatically via startTransition + addTransitionTypeexit="slide-down", wrap content with enter="slide-up" default="none"<ViewTransition name={\photo-${id}`} share="morph">`vercel-labs/react-view-transitions-demo) has a main branch with all 8 patterns applied, and a plain branch with no animations. Running the skill against the plain branch is the fastest way to see what it produces. 7--duration-exit: 150ms, --duration-enter: 210ms, --duration-move: 400ms): 8| Recipe | Props used | Timing |
|---|---|---|
| Fade (with blur) | enter="fade-in" / exit="fade-out" | 150ms out / 210ms in |
| Slide vertical | enter="slide-up" / exit="slide-down" | — |
| Directional nav | nav-forward / nav-back types | 60px horizontal + fade |
| Shared morph | share="morph" | 400ms with via-blur |
| Text morph | share="text-morph" | Hides old snapshot to prevent raster artifacts |
| Scale | enter="scale-in" / exit="scale-out" | 85% → 100% |
| Persistent isolation | viewTransitionName + animation: none | — |
| Reduced motion | @media (prefers-reduced-motion: reduce) | 0ms everywhere |
router.back() doesn't trigger transitions. The browser's popstate event is synchronous, which is incompatible with startViewTransition. The workaround is router.push() with an explicit URL. 4<ViewTransition> suppresses inner animations. When a parent VT executes its exit, nested child VTs don't fire their own enter/exit — only the outermost layer animates. The skill documents a GitHub issue (react#36135) with an experimental opt-in fix. 3<ViewTransition> is the double-animation trap. Wrapping {children} in layout.tsx with a <ViewTransition> — while individual pages also have their own VTs — produces conflicting animations. The skill flags this as the most common mistake: layouts persist across navigations, so enter/exit only fire once on initial mount, not on route changes. 9<ViewTransition> must come before any DOM node. If your component has a wrapping <div> before the <ViewTransition>, enter/exit will silently not fire. 4ViewTransition is not in React stable as of today. React 19.2 stable does not include it; the skill's PR corrected earlier documentation that mistakenly said "React 19.2+". 3Add view transitions to this app using the view transition skillAdd Suspense reveal animations to the skeleton fallbacks.
Also isolate the header so it doesn't slide with the page.
plain branch as the no-animation baseline 7react@canary, the skill still works but the React version setup adds friction. If you need router.back() animations for a browser-history-heavy app (e.g., a multi-step wizard), the popstate limitation is a real gap — no workaround exists inside the skill's scope.<ViewTransition> should communicate a spatial relationship or continuity. If you can't articulate what it communicates, don't add it." 4 That's useful framing regardless of whether you're prompting an agent or writing the code yourself.github.com
raw.githubusercontent.com
react.dev
raw.githubusercontent.com
github.com
raw.githubusercontent.com
raw.githubusercontent.com
caniuse.com
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.