본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)48k · #6106

vercel-react-view-transitions

하는 일

React나 Next.js로 만든 웹사이트의 서로 다른 부분 사이를 이동할 때 부드러운 애니메이션을 만드는 도구입니다. 같은 객체가 자리를 바꾸는 것처럼 요소가 화면 사이에서 연결되어 움직이게 합니다.

사용하는 경우

  • ✓목록에서 항목의 상세 페이지로 넘어갈 때.
  • ✓탭이나 섹션을 전환할 때.
  • ✓새 데이터가 로드되면서 화면이 애니메이션과 함께 갱신되어야 할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/vercel-react-view-transitions/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/vercel-react-view-transitions/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“사용자가 목록에서 제품을 클릭해 상세 페이지로 갈 때 부드러운 애니메이션을 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 도구는 브라우저 기술인 `document.startViewTransition`을 사용해 변경 전후의 화면을 '스냅샷'으로 찍습니다. 그다음 CSS 클래스를 사용해 이 스냅샷 사이의 전환을 애니메이션으로 만들고, 바뀌는 요소들을 연결합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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 Use

  • Use this skill when the task matches this description: Guide React and Next.js view transitions, shared element animations, route transitions, transition types, and reduced-motion-safe UI state animation.

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:

Priority Pattern What it communicates
1 Shared element (name) "Same thing — going deeper"
2 Suspense reveal "Data loaded"
3 List identity (per-item key) "Same items, new arrangement"
4 State change (enter/exit) "Something appeared/disappeared"
5 Route change (layout-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

Context Animation Why
Hierarchical navigation (list → detail) Type-keyed nav-forward / nav-back Communicates spatial depth
Lateral navigation (tab-to-tab) Bare <ViewTransition> (fade) or default="none" No depth to communicate
Suspense reveal enter/exit string props Content arriving
Revalidation / background refresh default="none" Silent — no animation needed

Reserve directional slides for hierarchical navigation (list → detail) and ordered sequences (prev/next photo, carousel, paginated results). For ordered sequences, the direction communicates position: "next" slides from right, "previous" from left. Lateral/unordered navigation (tab-to-tab) should not use directional slides — it falsely implies spatial depth.


Availability

  • 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.
  • Without Next.js: Install react@canary react-dom@canary (ViewTransition is not in stable React).
  • Browser support: Chromium 111+, Firefox 144+, Safari 18.2+. Graceful degradation on unsupported browsers.

Implementation Workflow

When adding view transitions to an existing app, follow references/implementation.md step by step. Start with the audit — do not skip it. Copy the CSS recipes from references/css-recipes.md into the global stylesheet — do not write your own animation CSS.


Core Concepts

The <ViewTransition> Component

import { ViewTransition } from 'react';

<ViewTransition>
  <Component />
</ViewTransition>

React auto-assigns a unique view-transition-name and calls document.startViewTransition behind the scenes. Never call startViewTransition yourself.

Animation Triggers

Trigger When it fires
enter <ViewTransition> first inserted during a Transition
exit <ViewTransition> first removed during a Transition
update DOM mutations inside a <ViewTransition>. With nested VTs, mutation applies to the innermost one
share Named VT unmounts and another with same name mounts in the same Transition

Only startTransition, useDeferredValue, or Suspense activate VTs. Regular setState does not animate.

Critical Placement Rule

<ViewTransition> only activates enter/exit if it appears before any DOM nodes:

// Works
<ViewTransition enter="auto" exit="auto">
  <div>Content</div>
</ViewTransition>

// Broken — div wraps the VT, suppressing enter/exit
<div>
  <ViewTransition enter="auto" exit="auto">
    <div>Content</div>
  </ViewTransition>
</div>

Styling with View Transition Classes

Props

Values: "auto" (browser cross-fade), "none" (disabled), "class-name" (custom CSS), or { [type]: value } for type-specific animations.

<ViewTransition default="none" enter="slide-in" exit="slide-out" share="morph" />

…

자주 묻는 질문

추가로 설치해야 하는 것이 있나요?

Next.js를 쓴다면 추가 설치는 필요 없습니다. Next.js를 쓰지 않는다면 특정 React 버전(`react@canary`와 `react-dom@canary`)을 설치해야 합니다.

'공유 요소 애니메이션'은 무엇인가요?

이미지나 제목처럼 같은 요소가 두 개의 다른 화면에 나타나고, 애니메이션이 이전 버전과 새 버전을 연결해 연속성을 주는 애니메이션입니다.

사용자의 브라우저가 이를 지원하지 않으면 어떻게 되나요?

애니메이션이 그냥 나타나지 않고, 웹사이트는 정상적으로 계속 작동합니다. 사용자 경험이 깨지지 않습니다.

상세 정보

작성자의 원본 설명

Guide React and Next.js view transitions, shared element animations, route transitions, transition types, and reduced-motion-safe UI state animation.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#6106
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬