openclaw-skills/vercel-react-view-transitions/SKILL.md
Guide for adding native-feeling page, route, shared-element, and list transitions in React and Next.js with the View Transition API.
npx skillsauth add seaworld008/commonly-used-high-value-skills vercel-react-view-transitionsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Practical guidance for implementing React View Transitions in production UI work. This skill is intended for code generation, refactoring, and review tasks where the goal is to add motion without introducing a heavyweight animation library.
This repository version is an original in-house rewrite informed by the public Vercel skill and related platform guidance. Keep the implementation grounded in React and Next.js behavior, not generic CSS animation habits.
Use this skill when the task involves any of the following:
Do not reach for this skill when the request is mainly about canvas, WebGL, game animation, or highly choreographed motion systems. In those cases, a dedicated animation or rendering approach is more appropriate.
ViewTransition support as experimental and version-sensitive.Think about view transitions as three separate decisions:
If those three decisions are not clear, do not start coding animation classes yet. Audit the UI first.
Before editing code, identify:
Good candidates:
Bad candidates:
Wrap the smallest meaningful UI region, not the whole application by default.
import { ViewTransition } from "react";
export function ProductCard({ children }: { children: React.ReactNode }) {
return (
<ViewTransition>
<article className="product-card">{children}</article>
</ViewTransition>
);
}
Prefer narrow boundaries because broad boundaries often create unnecessary cross-fades and make debugging harder.
Use transition-aware React flows when the UI update is non-urgent.
import { startTransition, useState } from "react";
export function SortableGrid() {
const [sort, setSort] = useState<"popular" | "latest">("popular");
function handleSort(next: "popular" | "latest") {
startTransition(() => {
setSort(next);
});
}
return (
<>
<button onClick={() => handleSort("popular")}>Popular</button>
<button onClick={() => handleSort("latest")}>Latest</button>
</>
);
}
If an update must be immediate and interaction-critical, do not force a transition just for visual effect.
Shared-element motion works only when the old and new elements represent the same conceptual object.
<ViewTransition name={`product-${product.id}`}>
<img src={product.image} alt={product.title} />
</ViewTransition>
Use stable IDs. Never derive names from array index or transient sort order.
Start with a minimal, working transition boundary. Then add motion classes after the render flow is correct.
@media (prefers-reduced-motion: no-preference) {
::view-transition-old(.slide-forward) {
animation: 180ms ease-out both fade-out, 220ms ease-out both slide-left;
}
::view-transition-new(.slide-forward) {
animation: 220ms ease-out both fade-in, 220ms ease-out both slide-in-right;
}
}
@keyframes fade-out {
to { opacity: 0; }
}
@keyframes fade-in {
from { opacity: 0; }
}
@keyframes slide-left {
to { transform: translateX(-16px); }
}
@keyframes slide-in-right {
from { transform: translateX(16px); }
}
Keep timing short. Most navigation transitions feel better in the 150ms to 250ms range than in long cinematic motion.
When reviewing a PR that uses view transitions, check the following:
Avoid these mistakes:
setState callThis skill is not a full animation design system. It does not replace:
If the user needs cinematic sequences, drag physics, or scroll-linked animation systems, switch to a more specialized approach.
When applying this skill, the agent should usually produce:
Prefer continuity over spectacle. A good view transition makes the state change easier to follow, not harder to understand.
tools
飞书审批:查询和处理审批待办/已办/实例,搜索可发起审批定义、查看定义详情并发起原生审批实例。当用户要处理审批任务、查看审批实例、搜索或发起审批时使用。审批待办不是飞书任务;非审批类待办走 lark-task。不负责创建审批定义;三方审批定义不走原生提单。
development
Use when a user needs reproducible repository sizing, language composition, file counts, or code-versus-comment ratios with pygount; record exclusions and verify measurement scope before interpreting results.
development
Route a development task to the official Hermes Agent skill, Graphify Codex artifact set, Open GSD Core bundle, or optional GSD Pi bundle without duplicating their installers or state machines.
development
飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按关键词搜索当前用户可见的机器人 / 智能体(agent)。当用户提到一个名字要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生 OpenAPI。