trove-react-view-transitions
/trove-react-view-transitions
Wdraża płynne animacje przejść w React przez View Transition API, bez zewnętrznej biblioteki animacji.
Ocena i bezpieczeństwo
- Pliki w paczce
- 5
- Skrypty
- 0
- Komentarze HTML
- 2
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 08.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- SKILL.md zawiera komentarze HTML (2). Nie widać ich w podglądzie Markdown, a model je czyta.
Co robi i kiedy
Wdraża płynne animacje przejść w React przez View Transition API, bez zewnętrznej biblioteki animacji.
Oryginalny opis (EN)
Implement smooth, native-feeling animations with React's View Transition API (`<ViewTransition>`, `addTransitionType`, CSS view-transition pseudo-elements). Use for page transitions, shared element morphs, Suspense reveals, list identity, or animating between React UI states without a third-party animation library.
Jak działa
- Session Init
- Stack Notes
- Load On Demand
- When To Animate
- Implementation Workflow
- Non-Negotiable Rules
- Verification
- Source
Podgląd SKILL.md
---
name: trove-react-view-transitions
description: "Implement smooth, native-feeling animations with React's View Transition API (`<ViewTransition>`, `addTransitionType`, CSS view-transition pseudo-elements). Use for page transitions, shared element morphs, Suspense reveals, list identity, or animating between React UI states without a third-party animation library."
metadata:
source: vercel-labs/agent-skills
upstream-version: 1.0.0
---
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
<!-- Regenerate: bun run build:skills -->
## Session Init
This skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict.
# React View Transitions
Animate between UI states using the browser's native View Transition API.
Declare what animates with `<ViewTransition>`, trigger when with
`startTransition`, `useDeferredValue`, or `Suspense`, and control how with CSS
classes from `references/css-recipes.md`. Unsupported browsers skip animations.
## Stack Notes
This skill assumes a Vite-based React 19 app (React Router, not Next.js
App Router). The React `<ViewTransition>` component is canary-only for Vite; use
`react@canary react-dom@canary` and verify with `npm ls react`. The
`references/nextjs.md` file is only for future Next.js work.
## Load On Demand
- `references/implementation.md` - required workflow when adding transitions.
- `references/css-recipes.md` - CSS recipes to copy into the global stylesheet.
- `references/patterns.md` - examples, events API, timing, and troubleshooting.
- `references/nextjs.md` - Next.js App Router reference only.
Do not inline those references into the conversation. Load the relevant file
when the implementation step needs it.
## When To Animate
Every transition must communicate continuity or spatial relationship. If you
cannot name what the motion communicates, skip it.
Apply every fitting pattern in this order:
| Priority | Pattern | Communicates |
|---|---|---|
| 1 | Shared element (`name`) | Same thing, going deeper |
| 2 | Suspense reveal | Data loaded |
| 3 | List identity (`key`) | Same items, new arrangement |
| 4 | State change (`enter`/`exit`) | Something appeared/disappeared |
| 5 | Route change | Going to a new place |
Use directional slides only for hierarchy or ordered sequences. Lateral tabs
should use a cross-fade or no animation.
## Implementation Workflow
1. Load `references/implementation.md` and start with the audit. Map every
`<Link>`, router navigation, `<Suspense>` boundary, page component,
persistent element, and shared visual element.
2. Copy the complete CSS recipe set from `references/css-recipes.md` into the
global stylesheet before wiring components.
3. Isolate persistent headers, navbars, sidebars, sticky controls, and matching
skeleton/content controls with `viewTransitionName`.
4. For hierarchical route changes, tag direction with `addTransitionType` inside
`startTransition`, then wrap page components, not layouts, in a type-keyed
`<ViewTransition>`.
5. For Suspense, wrap fallback and content separately. Use string props, not
type maps; Suspense resolves fire as separate transitions without route type.
6. For shared elements, use globally unique `name` values such as
`photo-${id}` and add fallback `enter`/`exit` when a pair might not form.
7. Verify every row in the navigation map: mount/unmount behavior, named-pair
formation, `default="none"`, persistent element isolation, and reduced
motion.
## Non-Negotiable Rules
- Only `startTransition`, `useDeferredValue`, or `Suspense` activate React view
transitions. Regular `setState` does not animate.
- `<ViewTransition>` must appear before any DOM node it needs to animate.
Wrapping the VT inside a `<div>` suppresses enter/exit.
- Use `default="none"` and explicit triggers. Bare VTs cross-fade on every
transition, including revalidation and background updates.
- Type-keyed props must include `default: "none"` unless broad cross-fades are
intentional.
- Pair `enter` with `exit`; otherwise the old page vanishes while the new one
animates.
- Never use a fade-out exit on pages with shared morphs. Use a directional exit
so the morph stays visually coherent.
- `router.back()` and browser back/forward do not trigger view transitions;
navigate to an explicit URL instead.
- Nested VTs inside an exiting parent do not run their own enter/exit. Avoid
layout-level wrappers around page content.
## Verification
Run the app and inspect the real transitions, including reduced-motion mode.
Check desktop and mobile viewports. Confirm that unsupported browsers degrade
to no animation rather than broken layout or invisible content.
## Source
Upstream: `vercel-labs/agent-skills` `react-view-transitions` (MIT). Adapted
for the Trove marketplace.
Pliki w paczce (5)
- SKILL.md 5 KB
- references/css-recipes.md 5 KB
- references/implementation.md 10 KB
- references/nextjs.md 6 KB
- references/patterns.md 8 KB
Wersje
W bazie nie ma innych skilli o nazwie trove-react-view-transitions.
Identyczna treść występuje jeszcze w 3 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki 1ba500010834 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95vercel-react-view-transitions
Pomaga dodawać płynne animacje przejść w React przez View Transition API: przejścia stron, wspólne elementy i zmiany kolejności listy. - 100vercel-react-view-transitions
Pomaga dodać płynne animacje przejść w React przez ViewTransition, w tym nawigację wstecz i elementy współdzielone. - 95vercel-react-view-transitions
Prowadzi przez dodanie animacji przejść stron i zmian listy w React przy użyciu API View Transition. - 100vercel-react-view-transitions
Wyjaśnia i wdraża animacje wejścia, wyjścia i zmiany kolejności komponentów w React przez View Transition. - 100vercel-react-view-transitions
Pomaga wdrożyć płynne przejścia widoków w React przez komponent ViewTransition, animacje tras i elementy wspólne. - 100vercel-react-view-transitions
Prowadzi przez implementację płynnych animacji z React View Transition API: komponent ViewTransition, addTransitionType i pseudoelementy CSS, dla przejść stron, współdzielonych elementów i list.