[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71HR8V065G3JD6EEQDZPAP3":3,"skill-same:01M71HR8V065G3JD6EEQDZPAP3":103},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":14,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M71HR8V065G3JD6EEQDZPAP3","vercel-react-view-transitions",null,"Guide for implementing smooth, native-feeling animations using React's View Transition API (`\u003CViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter\u002Fexit of components, animate list reorder, implement directional (forward\u002Fback) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.","agency-black\u002FSkills","agency-black","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F234862658?v=4","01M6HWVFPNGNR5N2CX9ECSAD57","agencia.black","01M719WF77BF3HN0N9FK1APEFY",0,"MIT","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Freact-view-transitions\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"vercel react view transitions","view","react view transitions","vercel","transitions","react","libraries","create","route","api","components","when","implementing","element","states","types","css","Animation","back","shared","2026-11-10 10:12:30",false,"---\nname: vercel-react-view-transitions\ndescription: Guide for implementing smooth, native-feeling animations using React's View Transition API (`\u003CViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter\u002Fexit of components, animate list reorder, implement directional (forward\u002Fback) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.\nlicense: MIT\nmetadata:\n  author: vercel\n  version: \"1.0.0\"\n---\n\n# React View Transitions\n\nAnimate between UI states using the browser's native `document.startViewTransition`. Declare *what* with `\u003CViewTransition>`, trigger *when* with `startTransition` \u002F `useDeferredValue` \u002F `Suspense`, control *how* with CSS classes. Unsupported browsers skip animations gracefully.\n\n## When to Animate\n\nEvery `\u003CViewTransition>` should communicate a spatial relationship or continuity. If you can't articulate what it communicates, don't add it.\n\nImplement **all** applicable patterns from this list, in this order:\n\n| Priority | Pattern | What it communicates |\n|----------|---------|---------------------|\n| 1 | **Shared element** (`name`) | \"Same thing — going deeper\" |\n| 2 | **Suspense reveal** | \"Data loaded\" |\n| 3 | **List identity** (per-item `key`) | \"Same items, new arrangement\" |\n| 4 | **State change** (`enter`\u002F`exit`) | \"Something appeared\u002Fdisappeared\" |\n| 5 | **Route change** (layout-level) | \"Going to a new place\" |\n\nThis 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.\n\n### Choosing Animation Style\n\n| Context | Animation | Why |\n|---------|-----------|-----|\n| Hierarchical navigation (list → detail) | Type-keyed `nav-forward` \u002F `nav-back` | Communicates spatial depth |\n| Lateral navigation (tab-to-tab) | Bare `\u003CViewTransition>` (fade) or `default=\"none\"` | No depth to communicate |\n| Suspense reveal | `enter`\u002F`exit` string props | Content arriving |\n| Revalidation \u002F background refresh | `default=\"none\"` | Silent — no animation needed |\n\nReserve directional slides for hierarchical navigation (list → detail) and ordered sequences (prev\u002Fnext photo, carousel, paginated results). For ordered sequences, the direction communicates position: \"next\" slides from right, \"previous\" from left. Lateral\u002Funordered navigation (tab-to-tab) should not use directional slides — it falsely implies spatial depth.\n\n---\n\n## Availability\n\n- **Next.js:** Do **not** install `react@canary` — the App Router already bundles React canary internally. `ViewTransition` works out of the box. `npm ls react` may show a stable-looking version; this is expected.\n- **Without Next.js:** Install `react@canary react-dom@canary` (`ViewTransition` is not in stable React).\n- Browser support: Chromium 111+, Firefox 144+, Safari 18.2+. Graceful degradation on unsupported browsers.\n\n---\n\n## Implementation Workflow\n\nWhen adding view transitions to an existing app, **follow `references\u002Fimplementation.md` step by step.** Start with the audit — do not skip it. Copy the CSS recipes from `references\u002Fcss-recipes.md` into the global stylesheet — do not write your own animation CSS.\n\n---\n\n## Core Concepts\n\n### The `\u003CViewTransition>` Component\n\n```jsx\nimport { ViewTransition } from 'react';\n\n\u003CViewTransition>\n  \u003CComponent \u002F>\n\u003C\u002FViewTransition>\n```\n\nReact auto-assigns a unique `view-transition-name` and calls `document.startViewTransition` behind the scenes. Never call `startViewTransition` yourself.\n\n### Animation Triggers\n\n| Trigger | When it fires |\n|---------|--------------|\n| **enter** | `\u003CViewTransition>` first inserted during a Transition |\n| **exit** | `\u003CViewTransition>` first removed during a Transition |\n| **update** | DOM mutations inside a `\u003CViewTransition>`. With nested VTs, mutation applies to the innermost one |\n| **share** | Named VT unmounts and another with same `name` mounts in the same Transition |\n\nOnly `startTransition`, `useDeferredValue`, or `Suspense` activate VTs. Regular `setState` does not animate.\n\n### Critical Placement Rule\n\n`\u003CViewTransition>` only activates enter\u002Fexit if it appears **before any DOM nodes**:\n\n```jsx\n\u002F\u002F Works\n\u003CViewTransition enter=\"auto\" exit=\"auto\">\n  \u003Cdiv>Content\u003C\u002Fdiv>\n\u003C\u002FViewTransition>\n\n\u002F\u002F Broken — div wraps the VT, suppressing enter\u002Fexit\n\u003Cdiv>\n  \u003CViewTransition enter=\"auto\" exit=\"auto\">\n    \u003Cdiv>Content\u003C\u002Fdiv>\n  \u003C\u002FViewTransition>\n\u003C\u002Fdiv>\n```\n\n---\n\n## Styling with View Transition Classes\n\n### Props\n\nValues: `\"auto\"` (browser cross-fade), `\"none\"` (disabled), `\"class-name\"` (custom CSS), or `{ [type]: value }` for type-specific animations.\n\n```jsx\n\u003CViewTransition default=\"none\" enter=\"slide-in\" exit=\"slide-out\" share=\"morph\" \u002F>\n```\n\nIf `default` is `\"none\"`, all triggers are off unless explicitly listed.\n\n### CSS Pseudo-Elements\n\n- `::view-transition-old(.class)` — outgoing snapshot\n- `::view-transition-new(.class)` — incoming snapshot\n- `::view-transition-group(.class)` — container\n- `::view-transition-image-pair(.class)` — old + new pair\n\nSee `references\u002Fcss-recipes.md` for ready-to-use animation recipes.\n\n---\n\n## Transition Types\n\nTag transitions with `addTransitionType` so VTs can pick different animations based on context. Call it multiple times to stack types — different VTs in the tree react to different types:\n\n```jsx\nstartTransition(() => {\n  addTransitionType('nav-forward');\n  addTransitionType('select-item');\n  router.push('\u002Fdetail\u002F1');\n});\n```\n\nPass an object to map types to CSS classes. Works on `enter`, `exit`, **and** `share`:\n\n```jsx\n\u003CViewTransition\n  enter={{ 'nav-forward': 'slide-from-right', 'nav-back': 'slide-from-left', default: 'none' }}\n  exit={{ 'nav-forward': 'slide-to-left', 'nav-back': 'slide-to-right', default: 'none' }}\n  share={{ 'nav-forward': 'morph-forward', 'nav-back': 'morph-back', default: 'morph' }}\n  default=\"none\"\n>\n  \u003CPage \u002F>\n\u003C\u002FViewTransition>\n```\n\n`enter` and `exit` don't have to be symmetric. For example, fade in but slide out directionally:\n\n```jsx\n\u003CViewTransition\n  enter={{ 'nav-forward': 'fade-in', 'nav-back': 'fade-in', default: 'none' }}\n  exit={{ 'nav-forward': 'nav-forward', 'nav-back': 'nav-back', default: 'none' }}\n  default=\"none\"\n>\n```\n\n**TypeScript:** `ViewTransitionClassPerType` requires a `default` key in the object.\n\nFor apps with multiple pages, extract the type-keyed VT into a reusable wrapper:\n\n```jsx\nexport function DirectionalTransition({ children }: { children: React.ReactNode }) {\n  return (\n    \u003CViewTransition\n      enter={{ 'nav-forward': 'nav-forward', 'nav-back': 'nav-back', default: 'none' }}\n      exit={{ 'nav-forward': 'nav-forward', 'nav-back': 'nav-back', default: 'none' }}\n      default=\"none\"\n    >\n      {children}\n    \u003C\u002FViewTransition>\n  );\n}\n```\n\n### `router.back()` and Browser Back Button\n\n`router.back()` and the browser's back\u002Fforward buttons do **not** trigger view transitions (`popstate` is synchronous, incompatible with `startViewTransition`). Use `router.push()` with an explicit URL instead.\n\n### Types and Suspense\n\nTypes are available during navigation but **not** during subsequent Suspense reveals (separate transitions, no type). Use type maps for page-level enter\u002Fexit; use simple string props for Suspense reveals.\n\n---\n\n## Shared Element Transitions\n\nSame `name` on two VTs — one unmounting, one mounting — creates a shared element morph:\n\n```jsx\n\u003CViewTransition name=\"hero-image\">\n  \u003Cimg src=\"\u002Fthumb.jpg\" onClick={() => startTransition(() => onSelect())} \u002F>\n\u003C\u002FViewTransition>\n\n\u002F\u002F On the other view — same name\n\u003CViewTransition name=\"hero-image\">\n  \u003Cimg src=\"\u002Ffull.jpg\" \u002F>\n\u003C\u002FViewTransition>\n```\n\n- Only one VT with a given `name` can be mounted at a time — use unique names (`photo-${id}`). Watch for reusable components: if a component with a named VT is rendered in both a modal\u002Fpopover *and* a page, both mount simultaneously and break the morph. Either make the name conditional (via a prop) or move the named VT out of the shared component into the specific consumer.\n- `share` takes precedence over `enter`\u002F`exit`. Think through each navigation path: when no matching pair forms (e.g., the target page doesn't have the same name), `enter`\u002F`exit` fires instead. Consider whether the element needs a fallback animation for those paths.\n- Never use a fade-out exit on pages with shared morphs — use a directional slide instead.\n\n---\n\n## Common Patterns\n\n### Enter\u002FExit\n\n```jsx\n{show && (\n  \u003CViewTransition enter=\"fade-in\" exit=\"fade-out\">\u003CPanel \u002F>\u003C\u002FViewTransition>\n)}\n```\n\n### List Reorder\n\n```jsx\n{items.map(item => (\n  \u003CViewTransition key={item.id}>\u003CItemCard item={item} \u002F>\u003C\u002FViewTransition>\n))}\n```\n\nTrigger inside `startTransition`. Avoid wrapper `\u003Cdiv>`s between list and VT.\n\n### Composing Shared Elements with List Identity\n\nShared elements and list identity are independent concerns — don't confuse one for the other. When a list item contains a shared element (e.g., an image that morphs into a detail view), use two nested `\u003CViewTransition>` boundaries:\n\n```jsx\n{items.map(item => (\n  \u003CViewTransition key={item.id}>                                      {\u002F* list identity *\u002F}\n    \u003CLink href={`\u002Fitems\u002F${item.id}`}>\n      \u003CViewTransition name={`item-image-${item.id}`} share=\"morph\">   {\u002F* shared element *\u002F}\n        \u003CImage src={item.image} \u002F>\n      \u003C\u002FViewTransition>\n      \u003Cp>{item.name}\u003C\u002Fp>\n    \u003C\u002FLink>\n  \u003C\u002FViewTransition>\n))}\n```\n\nThe outer VT handles list reorder\u002Fenter animations. The inner VT handles the cross-route shared element morph. Missing either layer means that animation silently doesn't happen.\n\n### Force Re-Enter with `key`\n\n```jsx\n\u003CViewTransition key={searchParams.toString()} enter=\"slide-up\" default=\"none\">\n  \u003CResultsGrid \u002F>\n\u003C\u002FViewTransition>\n```\n\n**Caution:** If wrapping `\u003CSuspense>`, changing `key` remounts the boundary and refetches.\n\n### Suspense Fallback to Content\n\nSimple cross-fade:\n```jsx\n\u003CViewTransition>\n  \u003CSuspense fallback={\u003CSkeleton \u002F>}>\u003CContent \u002F>\u003C\u002FSuspense>\n\u003C\u002FViewTransition>\n```\n\nDirectional reveal:\n```jsx\n\u003CSuspense fallback={\u003CViewTransition exit=\"slide-down\">\u003CSkeleton \u002F>\u003C\u002FViewTransition>}>\n  \u003CViewTransition enter=\"slide-up\" default=\"none\">\u003CContent \u002F>\u003C\u002FViewTransition>\n\u003C\u002FSuspense>\n```\n\nFor more patterns, see `references\u002Fpatterns.md`.\n\n---\n\n## How Multiple VTs Interact\n\nEvery VT matching the trigger fires simultaneously in a single `document.startViewTransition`. VTs in **different** transitions (navigation vs later Suspense resolve) don't compete.\n\n### Use `default=\"none\"` Liberally\n\nWithout it, every VT fires the browser cross-fade on **every** transition — Suspense resolves, `useDeferredValue` updates, background revalidations. Always use `default=\"none\"` and explicitly enable only desired triggers.\n\n### Two Patterns Coexist\n\n**Pattern A — Directional slides:** Type-keyed VT on each page, fires during navigation.\n**Pattern B — Suspense reveals:** Simple string props, fires when data loads (no type).\n\nThey coexist because they fire at different moments. `default=\"none\"` on both prevents cross-interference. Always pair `enter` with `exit`. Place directional VTs in page components, not layouts.\n\n### Nested VT Limitation\n\nWhen a parent VT exits, nested VTs inside it do **not** fire their own enter\u002Fexit — only the outermost VT animates. Per-item staggered animations during page navigation are not possible today. See [react#36135](https:\u002F\u002Fgithub.com\u002Ffacebook\u002Freact\u002Fpull\u002F36135) for an experimental opt-in fix.\n\n---\n\n## Next.js Integration\n\nFor Next.js setup (`experimental.viewTransition` flag, `transitionTypes` prop on `next\u002Flink`, App Router patterns, Server Components), see `references\u002Fnextjs.md`.\n\n---\n\n## Accessibility\n\nAlways add the reduced motion CSS from `references\u002Fcss-recipes.md` to your global stylesheet.\n\n---\n\n## Reference Files\n\n- **`references\u002Fimplementation.md`** — Step-by-step implementation workflow.\n- **`references\u002Fpatterns.md`** — Patterns, animation timing, events API, troubleshooting.\n- **`references\u002Fcss-recipes.md`** — Ready-to-use CSS animation recipes.\n- **`references\u002Fnextjs.md`** — Next.js App Router patterns and Server Component details.\n\n## Full Compiled Document\n\nFor the complete guide with all reference files expanded: `AGENTS.md`\n","# React View Transitions\n\nAnimate between UI states using the browser's native `document.startViewTransition`. Declare *what* with `\u003CViewTransition>`, trigger *when* with `startTransition` \u002F `useDeferredValue` \u002F `Suspense`, control *how* with CSS classes. Unsupported browsers skip animations gracefully.\n\n## When to Animate\n\nEvery `\u003CViewTransition>` should communicate a spatial relationship or continuity. If you can't articulate what it communicates, don't add it.\n\nImplement **all** applicable patterns from this list, in this order:\n\n| Priority | Pattern | What it communicates |\n|----------|---------|---------------------|\n| 1 | **Shared element** (`name`) | \"Same thing — going deeper\" |\n| 2 | **Suspense reveal** | \"Data loaded\" |\n| 3 | **List identity** (per-item `key`) | \"Same items, new arrangement\" |\n| 4 | **State change** (`enter`\u002F`exit`) | \"Something appeared\u002Fdisappeared\" |\n| 5 | **Route change** (layout-level) | \"Going to a new place\" |\n\nThis 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.\n\n### Choosing Animation Style\n\n| Context | Animation | Why |\n|---------|-----------|-----|\n| Hierarchical navigation (list → detail) | Type-keyed `nav-forward` \u002F `nav-back` | Communicates spatial depth |\n| Lateral navigation (tab-to-tab) | Bare `\u003CViewTransition>` (fade) or `default=\"none\"` | No depth to communicate |\n| Suspense reveal | `enter`\u002F`exit` string props | Content arriving |\n| Revalidation \u002F background refresh | `default=\"none\"` | Silent — no animation needed |\n\nReserve directional slides for hierarchical navigation (list → detail) and ordered sequences (prev\u002Fnext photo, carousel, paginated results). For ordered sequences, the direction communicates position: \"next\" slides from right, \"previous\" from left. Lateral\u002Funordered navigation (tab-to-tab) should not use directional slides — it falsely implies spatial depth.\n\n---\n\n## Availability\n\n- **Next.js:** Do **not** install `react@canary` — the App Router already bundles React canary internally. `ViewTransition` works out of the box. `npm ls react` may show a stable-looking version; this is expected.\n- **Without Next.js:** Install `react@canary react-dom@canary` (`ViewTransition` is not in stable React).\n- Browser support: Chromium 111+, Firefox 144+, Safari 18.2+. Graceful degradation on unsupported browsers.\n\n---\n\n## Implementation Workflow\n\nWhen adding view transitions to an existing app, **follow `references\u002Fimplementation.md` step by step.** Start with the audit — do not skip it. Copy the CSS recipes from `references\u002Fcss-recipes.md` into the global stylesheet — do not write your own animation CSS.\n\n---\n\n## Core Concepts\n\n### The `\u003CViewTransition>` Component\n\n```jsx\nimport { ViewTransition } from 'react';\n\n\u003CViewTransition>\n  \u003CComponent \u002F>\n\u003C\u002FViewTransition>\n```\n\nReact auto-assigns a unique `view-transition-name` and calls `document.startViewTransition` behind the scenes. Never call `startViewTransition` yourself.\n\n### Animation Triggers\n\n| Trigger | When it fires |\n|---------|--------------|\n| **enter** | `\u003CViewTransition>` first inserted during a Transition |\n| **exit** | `\u003CViewTransition>` first removed during a Transition |\n| **update** | DOM mutations inside a `\u003CViewTransition>`. With nested VTs, mutation applies to the innermost one |\n| **share** | Named VT unmounts and another with same `name` mounts in the same Transition |\n\nOnly `startTransition`, `useDeferredValue`, or `Suspense` activate VTs. Regular `setState` does not animate.\n\n### Critical Placement Rule\n\n`\u003CViewTransition>` only activates enter\u002Fexit if it appears **before any DOM nodes**:\n\n```jsx\n\u002F\u002F Works\n\u003CViewTransition enter=\"auto\" exit=\"auto\">\n  \u003Cdiv>Content\u003C\u002Fdiv>\n\u003C\u002FViewTransition>\n\n\u002F\u002F Broken — div wraps the VT, suppressing enter\u002Fexit\n\u003Cdiv>\n  \u003CViewTransition enter=\"auto\" exit=\"auto\">\n    \u003Cdiv>Content\u003C\u002Fdiv>\n  \u003C\u002FViewTransition>\n\u003C\u002Fdiv>\n```\n\n---\n\n## Styling with View Transition Classes\n\n### Props\n\nValues: `\"auto\"` (browser cross-fade), `\"none\"` (disabled), `\"class-name\"` (custom CSS), or `{ [type]: value }` for type-specific animations.\n\n```jsx\n\u003CViewTransition default=\"none\" enter=\"slide-in\" exit=\"slide-out\" share=\"morph\" \u002F>\n```\n\nIf `default` is `\"none\"`, all triggers are off unless explicitly listed.\n\n### CSS Pseudo-Elements\n\n- `::view-transition-old(.class)` — outgoing snapshot\n- `::view-transition-new(.class)` — incoming snapshot\n- `::view-transition-group(.class)` — container\n- `::view-transition-image-pair(.class)` — old + new pair\n\nSee `references\u002Fcss-recipes.md` for ready-to-use animation recipes.\n\n---\n\n## Transition Types\n\nTag transitions with `addTransitionType` so VTs can pick different animations based on context. Call it multiple times to stack types — different VTs in the tree react to different types:\n\n```jsx\nstartTransition(() => {\n  addTransitionType('nav-forward');\n  addTransitionType('select-item');\n  router.push('\u002Fdetail\u002F1');\n});\n```\n\nPass an object to map types to CSS classes. Works on `enter`, `exit`, **and** `share`:\n\n```jsx\n\u003CViewTransition\n  enter={{ 'nav-forward': 'slide-from-right', 'nav-back': 'slide-from-left', default: 'none' }}\n  exit={{ 'nav-forward': 'slide-to-left', 'nav-back': 'slide-to-right', default: 'none' }}\n  share={{ 'nav-forward': 'morph-forward', 'nav-back': 'morph-back', default: 'morph' }}\n  default=\"none\"\n>\n  \u003CPage \u002F>\n\u003C\u002FViewTransition>\n```\n\n`enter` and `exit` don't have to be symmetric. For example, fade in but slide out directionally:\n\n```jsx\n\u003CViewTransition\n  enter={{ 'nav-forward': 'fade-in', 'nav-back': 'fade-in', default: 'none' }}\n  exit={{ 'nav-forward': 'nav-forward', 'nav-back': 'nav-back', default: 'none' }}\n  default=\"none\"\n>\n```\n\n**TypeScript:** `ViewTransitionClassPerType` requires a `default` key in the object.\n\nFor apps with multiple pages, extract the type-keyed VT into a reusable wrapper:\n\n```jsx\nexport function DirectionalTransition({ children }: { children: React.ReactNode }) {\n  return (\n    \u003CViewTransition\n      enter={{ 'nav-forward': 'nav-forward', 'nav-back': 'nav-back', default: 'none' }}\n      exit={{ 'nav-forward': 'nav-forward', 'nav-back': 'nav-back', default: 'none' }}\n      default=\"none\"\n    >\n      {children}\n    \u003C\u002FViewTransition>\n  );\n}\n```\n\n### `router.back()` and Browser Back Button\n\n`router.back()` and the browser's back\u002Fforward buttons do **not** trigger view transitions (`popstate` is synchronous, incompatible with `startViewTransition`). Use `router.push()` with an explicit URL instead.\n\n### Types and Suspense\n\nTypes are available during navigation but **not** during subsequent Suspense reveals (separate transitions, no type). Use type maps for page-level enter\u002Fexit; use simple string props for Suspense reveals.\n\n---\n\n## Shared Element Transitions\n\nSame `name` on two VTs — one unmounting, one mounting — creates a shared element morph:\n\n```jsx\n\u003CViewTransition name=\"hero-image\">\n  \u003Cimg src=\"\u002Fthumb.jpg\" onClick={() => startTransition(() => onSelect())} \u002F>\n\u003C\u002FViewTransition>\n\n\u002F\u002F On the other view — same name\n\u003CViewTransition name=\"hero-image\">\n  \u003Cimg src=\"\u002Ffull.jpg\" \u002F>\n\u003C\u002FViewTransition>\n```\n\n- Only one VT with a given `name` can be mounted at a time — use unique names (`photo-${id}`). Watch for reusable components: if a component with a named VT is rendered in both a modal\u002Fpopover *and* a page, both mount simultaneously and break the morph. Either make the name conditional (via a prop) or move the named VT out of the shared component into the specific consumer.\n- `share` takes precedence over `enter`\u002F`exit`. Think through each navigation path: when no matching pair forms (e.g., the target page doesn't have the same name), `enter`\u002F`exit` fires instead. Consider whether the element needs a fallback animation for those paths.\n- Never use a fade-out exit on pages with shared morphs — use a directional slide instead.\n\n---\n\n## Common Patterns\n\n### Enter\u002FExit\n\n```jsx\n{show && (\n  \u003CViewTransition enter=\"fade-in\" exit=\"fade-out\">\u003CPanel \u002F>\u003C\u002FViewTransition>\n)}\n```\n\n### List Reorder\n\n```jsx\n{items.map(item => (\n  \u003CViewTransition key={item.id}>\u003CItemCard item={item} \u002F>\u003C\u002FViewTransition>\n))}\n```\n\nTrigger inside `startTransition`. Avoid wrapper `\u003Cdiv>`s between list and VT.\n\n### Composing Shared Elements with List Identity\n\nShared elements and list identity are independent concerns — don't confuse one for the other. When a list item contains a shared element (e.g., an image that morphs into a detail view), use two nested `\u003CViewTransition>` boundaries:\n\n```jsx\n{items.map(item => (\n  \u003CViewTransition key={item.id}>                                      {\u002F* list identity *\u002F}\n    \u003CLink href={`\u002Fitems\u002F${item.id}`}>\n      \u003CViewTransition name={`item-image-${item.id}`} share=\"morph\">   {\u002F* shared element *\u002F}\n        \u003CImage src={item.image} \u002F>\n      \u003C\u002FViewTransition>\n      \u003Cp>{item.name}\u003C\u002Fp>\n    \u003C\u002FLink>\n  \u003C\u002FViewTransition>\n))}\n```\n\nThe outer VT handles list reorder\u002Fenter animations. The inner VT handles the cross-route shared element morph. Missing either layer means that animation silently doesn't happen.\n\n### Force Re-Enter with `key`\n\n```jsx\n\u003CViewTransition key={searchParams.toString()} enter=\"slide-up\" default=\"none\">\n  \u003CResultsGrid \u002F>\n\u003C\u002FViewTransition>\n```\n\n**Caution:** If wrapping `\u003CSuspense>`, changing `key` remounts the boundary and refetches.\n\n### Suspense Fallback to Content\n\nSimple cross-fade:\n```jsx\n\u003CViewTransition>\n  \u003CSuspense fallback={\u003CSkeleton \u002F>}>\u003CContent \u002F>\u003C\u002FSuspense>\n\u003C\u002FViewTransition>\n```\n\nDirectional reveal:\n```jsx\n\u003CSuspense fallback={\u003CViewTransition exit=\"slide-down\">\u003CSkeleton \u002F>\u003C\u002FViewTransition>}>\n  \u003CViewTransition enter=\"slide-up\" default=\"none\">\u003CContent \u002F>\u003C\u002FViewTransition>\n\u003C\u002FSuspense>\n```\n\nFor more patterns, see `references\u002Fpatterns.md`.\n\n---\n\n## How Multiple VTs Interact\n\nEvery VT matching the trigger fires simultaneously in a single `document.startViewTransition`. VTs in **different** transitions (navigation vs later Suspense resolve) don't compete.\n\n### Use `default=\"none\"` Liberally\n\nWithout it, every VT fires the browser cross-fade on **every** transition — Suspense resolves, `useDeferredValue` updates, background revalidations. Always use `default=\"none\"` and explicitly enable only desired triggers.\n\n### Two Patterns Coexist\n\n**Pattern A — Directional slides:** Type-keyed VT on each page, fires during navigation.\n**Pattern B — Suspense reveals:** Simple string props, fires when data loads (no type).\n\nThey coexist because they fire at different moments. `default=\"none\"` on both prevents cross-interference. Always pair `enter` with `exit`. Place directional VTs in page components, not layouts.\n\n### Nested VT Limitation\n\nWhen a parent VT exits, nested VTs inside it do **not** fire their own enter\u002Fexit — only the outermost VT animates. Per-item staggered animations during page navigation are not possible today. See [react#36135](https:\u002F\u002Fgithub.com\u002Ffacebook\u002Freact\u002Fpull\u002F36135) for an experimental opt-in fix.\n\n---\n\n## Next.js Integration\n\nFor Next.js setup (`experimental.viewTransition` flag, `transitionTypes` prop on `next\u002Flink`, App Router patterns, Server Components), see `references\u002Fnextjs.md`.\n\n---\n\n## Accessibility\n\nAlways add the reduced motion CSS from `references\u002Fcss-recipes.md` to your global stylesheet.\n\n---\n\n## Reference Files\n\n- **`references\u002Fimplementation.md`** — Step-by-step implementation workflow.\n- **`references\u002Fpatterns.md`** — Patterns, animation timing, events API, troubleshooting.\n- **`references\u002Fcss-recipes.md`** — Ready-to-use CSS animation recipes.\n- **`references\u002Fnextjs.md`** — Next.js App Router patterns and Server Component details.\n\n## Full Compiled Document\n\nFor the complete guide with all reference files expanded: `AGENTS.md`\n",{"name":5,"license":15,"metadata":49,"description":7},{"author":27,"version":50},"1.0.0","main","681496e0662f4c45c4758fae9d4510ae87311bf2","react-view-transitions","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills","https:\u002F\u002Fgithub.com\u002Fagency-black","http:\u002F\u002Fwww.dogma.black","Las grandes ideas merecen una ejecución impecable. Construimos plataformas web, aplicaciones y ecosistemas digitales completos. Esta Trinidad es nuestro dogma.","2026-05-29 16:13:55",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add agency-black\u002FSkills --skill vercel-react-view-transitions",{"tool":65,"command":66},"bunx","bunx skills add agency-black\u002FSkills --skill vercel-react-view-transitions",{"tool":68,"command":69},"pnpm","pnpm dlx skills add agency-black\u002FSkills --skill vercel-react-view-transitions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Freact-view-transitions\u002FSKILL.md",true,[73,79,83,87,91,95,99],{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"AGENTS.md","REFERENCE","参考文档",32301,"https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Freact-view-transitions\u002FAGENTS.md",{"path":80,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":81,"sourceHtmlUrl":82},"metadata.json",852,"https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Freact-view-transitions\u002Fmetadata.json",{"path":84,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":85,"sourceHtmlUrl":86},"README.md",2098,"https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Freact-view-transitions\u002FREADME.md",{"path":88,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fcss-recipes.md",5226,"https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Freact-view-transitions\u002Freferences\u002Fcss-recipes.md",{"path":92,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fimplementation.md",10165,"https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Freact-view-transitions\u002Freferences\u002Fimplementation.md",{"path":96,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fnextjs.md",5876,"https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Freact-view-transitions\u002Freferences\u002Fnextjs.md",{"path":100,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fpatterns.md",8347,"https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Freact-view-transitions\u002Freferences\u002Fpatterns.md",[104,131,160,188,210,216],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":44},"01M71JZVZ0TVW7Z5DQBRWSBG8A","zarr-python","Chunked N-D arrays for cloud storage (Zarr-Python 3). Compressed arrays, parallel I\u002FO, S3\u002FGCS via fsspec, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Fzarr-python\u002FSKILL.md",[],[111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130],"zarr python","python","zarr","arrays","Cloud Storage","remote","workflows","scientific","read","write","edit","parallel","dask","for","s3fs","use","numpy","s3","scientific computing","scale",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":135,"sourceHtmlUrl":136,"categories":137,"keywords":141,"publishedAt":44},"01M71JYXC5VAEJT8KXN5GRK32S","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Fxvary-stock-research\u002FSKILL.md",[138],{"categoryNo":139,"categoryName":140,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",[142,143,144,145,146,147,148,112,149,117,150,151,152,153,154,155,156,157,158,159],"xvary","stock","research","xvary stock research","sec edgar","community","equity","thesis","analysis","code","Market","compare","market data","analyze","with","codex","cursor","2026",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":164,"licenseFileUrl":165,"sourceHtmlUrl":166,"categories":167,"keywords":172,"publishedAt":44},"01M71JVSDPDQ5040YBN6J1ASKY","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FSKILL.md",[168,171],{"categoryNo":169,"categoryName":170,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[173,174,175,124,176,177,178,179,180,181,182,156,183,184,185,186,187],"webapp","testing","webapp testing","applications","local","frontend","debugging","toolkit","logs","browser","playwright","web","behavior","ui","screenshots",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":164,"licenseFileUrl":192,"sourceHtmlUrl":193,"categories":194,"keywords":196,"publishedAt":44},"01M71JV64CW7R6FYYK9JWWGW0X","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Fweb-artifacts-builder\u002FSKILL.md",[195],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[197,198,199,184,200,201,40,124,202,203,178,204,126,205,34,29,206,207,208,209],"builder","artifacts builder","artifacts","web artifacts builder","single-file","Tailwind","ui components","single","file","multi","state","routing","state management",{"skillNo":211,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":212,"categories":213,"keywords":215,"publishedAt":44},"01M71JS4X2FRY41DE84DEP06MN","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Fvercel-react-view-transitions\u002FSKILL.md",[214],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[29,24,25,26,27,28,43,42,41,40,39,38,37,36,35,34,33,32,31,30],{"skillNo":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":223,"publishedAt":44},"01M71JS1WZ1J4F9YVC2203JBJW","vercel-react-native-skills","React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.","https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Fvercel-react-native-skills\u002FSKILL.md",[222],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[27,224,29,225,226,227,228,229,230,124,231,36,232,126,233,234,35,235,236,34],"vercel react native skills","react native","native","react native skills","modules","platform","animations","performance","triggers","react native components","apps","best practices","tasks"]