vercel-labs/react-view-transitions-demo

Next.js gallery app showcasing React View Transitions — shared element morphs, directional navigation, Suspense reveals, and more

TypeScript

30

73 commits

updated Jul 23, 2026

See the code

README

React View Transitions Demo

A Next.js photography gallery demonstrating React View Transitions — shared element morphs, directional navigation, Suspense reveals, and more. Also serves as a testing ground for the React View Transitions agent skill.

The main branch has all view transition patterns applied; the plain branch is the base app without animations.

Live Demo

App Features

  • Gallery page — Searchable, sortable photo grid with URL-based state (?q=...&sort=...)
  • Photo detail page — Responsive layout with hero image and metadata
  • Photographers page — Tab-based navigation between photographer collections
  • Suspense boundaries — Skeleton loading states throughout

View Transition Patterns

WhereWhat happensHow
Grid → detail photoThumbnail morphs into the hero image and backNamed <ViewTransition> with share="morph" on both sides
Page navigationPages slide left/right based on navigation directiontransitionTypes on next/link + type-mapped enter/exit on page <ViewTransition>
Skeleton → contentSkeleton slides down and fades out, content slides upSeparate <ViewTransition> on Suspense fallback (exit) and content (enter)
Photographer tabsGrid crossfades when switching between photographers<ViewTransition key={slug} name="collection-content" share="auto"> forces remount with shared morph
Search / filterGrid animates as photos are added or removedstartTransition + router.replace triggers list-item <ViewTransition> reorder
Sort buttonsActive button highlights instantly without waiting for the transition to finishuseOptimistic ensures interactive state isn't blocked by the view transition
Header & search barStay fixed in place while everything else slidesviewTransitionName on the element + CSS animation: none on its ::view-transition-group
Reduced motionAll animations are disabledprefers-reduced-motion: reduce sets animation-duration: 0s on all VT pseudo-elements

Try It

Install the skill and prompt your agent against the plain branch:

npx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-view-transitions
Add view transitions to this app using the view transition skill

Output is not deterministic — the agent may not cover every page or pattern in one pass. Review what it did, then ask for what's missing:

Add Suspense reveal animations to the skeleton fallbacks.
Also add element isolation to the header so it doesn't slide with the page.
agent-skill
nextjs
react
tailwindcss
view-transitions

Contributors

aurorascharff

72 commits

vercel-labs/react-view-transitions-demo

Next.js gallery app showcasing React View Transitions — shared element morphs, directional navigation, Suspense reveals, and more

TypeScript

30

73 commits

updated Jul 23, 2026

See the code

README

React View Transitions Demo

A Next.js photography gallery demonstrating React View Transitions — shared element morphs, directional navigation, Suspense reveals, and more. Also serves as a testing ground for the React View Transitions agent skill.

The main branch has all view transition patterns applied; the plain branch is the base app without animations.

Live Demo

App Features

  • Gallery page — Searchable, sortable photo grid with URL-based state (?q=...&sort=...)
  • Photo detail page — Responsive layout with hero image and metadata
  • Photographers page — Tab-based navigation between photographer collections
  • Suspense boundaries — Skeleton loading states throughout

View Transition Patterns

WhereWhat happensHow
Grid → detail photoThumbnail morphs into the hero image and backNamed <ViewTransition> with share="morph" on both sides
Page navigationPages slide left/right based on navigation directiontransitionTypes on next/link + type-mapped enter/exit on page <ViewTransition>
Skeleton → contentSkeleton slides down and fades out, content slides upSeparate <ViewTransition> on Suspense fallback (exit) and content (enter)
Photographer tabsGrid crossfades when switching between photographers<ViewTransition key={slug} name="collection-content" share="auto"> forces remount with shared morph
Search / filterGrid animates as photos are added or removedstartTransition + router.replace triggers list-item <ViewTransition> reorder
Sort buttonsActive button highlights instantly without waiting for the transition to finishuseOptimistic ensures interactive state isn't blocked by the view transition
Header & search barStay fixed in place while everything else slidesviewTransitionName on the element + CSS animation: none on its ::view-transition-group
Reduced motionAll animations are disabledprefers-reduced-motion: reduce sets animation-duration: 0s on all VT pseudo-elements

Try It

Install the skill and prompt your agent against the plain branch:

npx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-view-transitions
Add view transitions to this app using the view transition skill

Output is not deterministic — the agent may not cover every page or pattern in one pass. Review what it did, then ask for what's missing:

Add Suspense reveal animations to the skeleton fallbacks.
Also add element isolation to the header so it doesn't slide with the page.
agent-skill
nextjs
react
tailwindcss
view-transitions

Contributors

aurorascharff

72 commits

Languages

TypeScript

83.7%

CSS

15.1%

JavaScript

1.3%