vercel-react-view-transitions

Implements native view transition animations in React and Next.js applications.

Updated Sep 6, 2026
One-click install
npx skills add https://github.com/AbuBakar125-co/Resturant_web --skill vercel-react-view-transitions-abubakar125-co
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-view-transitions
Source: https://github.com/AbuBakar125-co/Resturant_web/tree/main/agent/skills/vercel-react-view-transitions
Command: npx skills add https://github.com/AbuBakar125-co/Resturant_web --skill vercel-react-view-transitions-abubakar125-co

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adding smooth, native-feeling animations between UI states in React is error-prone: transitions silently fail, shared element morphs never fire, and Suspense reveals flicker. This Skill provides a structured workflow, production-tested patterns, and ready-to-use CSS for React's View Transition API. ## Core Features & Use Cases - ViewTransition Component Guidance: Covers enter, exit, update, and share triggers, placement rules, and the critical default="none" discipline to prevent unwanted cross-fades. - Directional Navigation & Shared Elements: Use addTransitionType and type-keyed class maps for forward/back slides, and named <ViewTransition> pairs for cross-route shared element morphs. - Next.js Integration: Documents transitionTypes on next/link and useRouter, loading.tsx Suspense boundaries, same-route dynamic segments, and prefetch requirements. - Use Case: When building a photo gallery where tapping a thumbnail morphs it into a full detail view with a directional slide, this Skill walks you through the audit, CSS recipes, and verification steps. ## Quick Start Ask the agent to add view transitions to your React or Next.js app, starting with an audit of all links, Suspense boundaries, and shared visual elements.

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 Next.js?

Wrap each page component in a type-keyed ViewTransition and tag navigations with transitionTypes on next/link or addTransitionType inside startTransition. The App Router bundles React canary, so ViewTransition works without installing react@canary.

How do shared element transitions work in React?

Give two ViewTransition components the same unique name prop 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 the target must be rendered at navigation time for the pair to form.

Does ViewTransition work in stable React without Next.js?

No, ViewTransition is not in stable React. Outside Next.js you must install react@canary and react-dom@canary. Next.js App Router already bundles a compatible React internally, so no extra install is needed there.

Why is my React view transition not animating?

Common causes: the state update is not inside startTransition, a DOM node wraps the ViewTransition suppressing enter/exit, or default="none" blocks the trigger without an explicit prop. Shared morphs also fail silently when the navigation never adds the required transition type.

Which browsers support the View Transition API?

React's ViewTransition requires Chromium 125 or later, Firefox 144 or later, or Safari 18.2 or later. Unsupported browsers skip animations gracefully, so the app remains fully functional without transitions.