vercel-labs avatar

Vercel React View Transitions

This is a comprehensive guide to React's View Transition API, covering the `<ViewTransition>` component, transition types, and CSS pseudo-elements for animating UI state changes without third-party libraries. The documentation is notably opinionated about implementation order and when to animate, prioritizing shared element transitions for hierarchical navigation and explicitly discouraging animations that don't communicate spatial relationships. It includes ready-to-use CSS recipes and addresses Next.js integration quirks like the canary React version bundling. One limitation to note: browser back button animations aren't supported due to popstate being synchronous. The skill works best when you follow the provided implementation workflow rather than cherry-picking patterns, since it's designed as a complete system for native-feeling page transitions and component animations.

GitHub stars
27.8K
last updated
Jun 10, 2026

Install

$ npx -y skills add vercel-labs/agent-skills --skill vercel-react-view-transitions --agent claude-code

Installs into .claude/skills of the current project.

Files

React View Transitions

Animate between UI states using the browser's native document.startViewTransition. Declare what with <ViewTransition>, trigger when with startTransition / useDeferredValue / Suspense, control how with CSS classes. Unsupported browsers skip animations gracefully.

When to Animate

Every <ViewTransition> should communicate a spatial relationship or continuity. If you can't articulate what it communicates, don't add it.

Implement all applicable patterns from this list, in this order:

PriorityPatternWhat it communicates
1Shared element (name)"Same thing — going deeper"
2Suspense reveal"Data loaded"
3List identity (per-item key)"Same items, new arrangement"
4State change (enter/exit)"Something appeared/disappeared"
5Route change (page-level)"Going to a new place"

This is an implementation order, not a "pick one" list. Implement every pattern that fits the app. Only skip a pattern if the app has no use case for it.

Choosing Animation Style

Sponsors

Details

Repository
github.com/vercel-labs/agent-skills
Categories
Frontend Development, Backend & APIs, Documentation, AI & Agent Building, Cloud & Infrastructure, Design & UI/UX
First seen
Jun 11, 2026

More from vercel-labs/agent-skills

All 14
1vercel avatarreact-vendoringvercel/next.jsreact vendoring945skills.sh installs
2remix-run avatarreact-router-data-moderemix-run/agent-skillsreact router data mode914skills.sh installs
3syncfusion avatarsyncfusion-react-treegridsyncfusion/react-ui-components-skillsImplements Syncfusion React TreeGrid for hierarchical data with sorting, filtering, editing, exporting, paging, virtual scrolling, and advanced features. Suppor771skills.sh installs
4syncfusion avatarsyncfusion-react-licensesyncfusion/react-ui-components-skillsUse this skill when the user asks about Syncfusion React licensing, license keys, license registration, license validation errors, trial licenses, or license tr744skills.sh installs
5syncfusion avatarsyncfusion-react-notificationssyncfusion/react-ui-components-skillsComprehensive guide for implementing Syncfusion React Notification components including Badge, Message, Skeleton, Toast, and Spinner. Use this when applying sta684skills.sh installs
6syncfusion avatarsyncfusion-angular-licensesyncfusion/angular-ui-components-skillsUse this skill when the user asks about Syncfusion Angular licensing, license keys, license registration, license validation errors, trial licenses, or license 330skills.sh installs