Communitygithub.com

MengTo/Skills

用于设计或实现 Stripe、Linear、Apple 和 Vercel 级产品级 Web 动效。涵盖动效原理、缓动/时长默认值、编排模式、滚动/悬停交互、性能、无障碍(减少动效)及实现指南。

Skills 是什么?

该技能旨在帮助开发者交付**品味卓越、产品级**的动效,而非简单堆砌动画。其核心理念源自 Stripe、Linear、Apple 和 Vercel 等顶级产品的动效风格,强调克制、清晰的编排、物理感而非卡通化、以及微妙的纹理与深度。技能提供了可直接复用的动效原语(如淡入上升、缩放淡入、滑动、形态变化),并给出了微交互、UI 状态变更、页面区块进入等场景的实用时长与缓动默认值,以及每个元素 40-90ms 的交错间隔建议。此外,还包含了不可妥协的性能规则(优先变换 transform 和透明度 opacity,避免触发重排)和无障碍支持指南(必须适配 `prefers-reduced-motion`)。无论使用 CSS、GSAP 还是 Framer Motion,本技能都能提供从设计目标到编码实现的全链路指导。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/MengTo/Skills/tree/HEAD/agent-skills/web-design/animation-systems

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

动画系统 (Stripe × Linear × Apple × Vercel)

本技能助您交付品味卓越、产品级的动效。 不是“更多动画”。 而是更好的动画:清晰、层次、反馈与愉悦——毫无卡顿。


目标(动效为何存在)

使用动画的目的:

  1. 阐明层次(何者重要)
  2. 确认操作(反馈)
  3. 引导注意(下一步看哪里)
  4. 保持连贯(空间关系)
  5. 增添精致(工艺信号)

如果一个动画不服务于上述任一目标,请删除它。


Stripe/Linear/Apple/Vercel 风格(共同特征)

1) 克制

  • 更少的动画,更精心的选择。
  • 一个强大的主角时刻,其余为辅助动效。

2) 清晰的编排

  • 主要元素先动。
  • 次要元素以微小交错跟随。
  • 动效建立“阅读顺序”。

3) 物理但不卡通

  • 使用感觉 人性化 的缓动(柔和加速 + 温和稳定)。
  • 严肃的产品 UI 中避免弹跳默认值。

4) 纹理 + 深度(微妙)

  • 轻微视差、柔和阴影、模糊淡入、光束。
  • 除非是主角,否则避免沉重的 3D。

动效原语(优先构建这些)

思考可随处复用的原语。

A) 淡入 + 上升(默认入场)

用于:文本块、卡片、模态框。

  • 透明度:0 → 1
  • Y 轴:12–24px → 0
  • 时长:根据大小 300–700ms

B) 缩放 + 淡入(微强调)

用于:弹出框、提示框、选中状态。

  • 缩放:0.98 → 1
  • 透明度:0 → 1

C) 滑动(导航)

用于:抽屉、步骤过渡。

  • 使用 transform 平移;避免动画化布局。

D) 变形 / 共享元素(高工艺)

用于:标签指示器、展开卡片。

  • 需要一致的几何形状和可测量的布局。

默认值(实用数值)

将这些作为起始系统。

时长(经验法则)

  • 微交互(悬停/按压):120–200ms
  • UI 状态变化(切换、选择):180–260ms
  • 小型过渡(弹出框、提示框):220–320ms
  • 页面区块入场:400–800ms
  • 主角序列:800–1600ms(含内部节拍)

缓动(安全集)

选择一小套并重复使用。

  • UI:ease-out 带温和稳定
  • 强调:略强的缓动
  • 入场:ease-out
  • 出场:ease-in(更快)

如果实现:

  • 使用动画库的 “power2.out / expo.out” 等效值。
  • 除非品牌风格偏活泼,否则避免弹性/弹跳。

交错

  • 每个元素 40–90ms(文本行/卡片)
  • 移动端使用更小的交错值

编排模式

1) “主角 → 辅助元素”

  • 主角视觉元素先动画入场。
  • 标题接下来出现。
  • 行动召唤按钮最后出现。

2) “滚动时区块揭示”

  • 当区块约 20–30% 可见时触发。
  • 只动画一次(不要在微小的滚动上重播)。

3) “悬停:上移 + 发光”

  • Y 轴:-2 到 -6px
  • 阴影:轻微增加
  • 可选:边框/渐变发光

4) “聚焦环 + 微位移”

  • 对于表单字段:聚焦环 + 微小的缩放/平移以获得响应性。

性能规则(不可妥协)

动画化正确的属性

优先使用:

  • transform (平移/缩放/旋转)
  • opacity

避免(除非必要):

  • width/height/top/left
  • 大面积上的昂贵滤镜

尊重 GPU

  • 在重负载 Canvas 中限制设备像素比(1–2)
  • 保持模糊微妙且范围小
  • 避免同时动画多个阴影

减少重排

  • 不要每帧都测量布局。
  • 对于滚动效果,使用批量读写操作的库。

无障碍:减少动效

始终支持 prefers-reduced-motion。

策略:

  • 保持内容可见。
  • 用 即时状态 + 微妙透明度替换动效。
  • 禁用滚动擦拭/固定。

询问用户:

  • “您是否想要一种减少动效模式,禁用所有非必要的动效?”

实现指南(不限定库)

对于简单站点

  • 使用 CSS 过渡处理小的悬停/切换。
  • 使用一个动效库(GSAP 或 Framer Motion)处理复杂序列。

对于产品站点

  • 创建动效令牌集:
    • 时长
    • 缓动曲线
    • 标准偏移量 (8/16/24px)
    • 交错默认值

对于主角时刻

  • 使用时间线(或关键帧)并带有标签化的节拍。
  • 先锁定相机/场景移动,然后叠加文本。

应向用户询问什么

  • 品牌定位:Stripe(精致)、Linear(极简)、Apple(电影感)、Vercel(开发者/产品)?
  • 关键时刻有哪些?(主角、滚动故事、悬停卡片、导航过渡)
  • 是否有性能限制?(移动端、低端设备)
  • 减少动效的需求?

输出格式(当被要求“添加 Stripe/Linear 风格的动画”时)

返回:

  1. 动效目标(我们要传达什么)
  2. 动效令牌(时长 + 缓动 + 偏移量)
  3. 编排计划(时间线节拍)
  4. 实现注意事项(性能 + 减少动效)
  5. 一个小代码片段(CSS 或 GSAP/Framer,取决于技术栈)

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

MengTo/Skills

Create polished 60 fps 4:3 4K browser screen-recording style videos from Codex in-app browser captures, with browser-only crop, natural macOS cursor styling, deliberate click choreography, zoom-follow framing, ffprobe/thumbnail verification, and optional native recording compatibility checks. Use when the user asks to record or re-record browser actions, show cursor clicks and zooms, make Dribbble/UI inspiration or product demo recordings, or asks whether Codex, Playwright, or an MCP can produce a natural browser demo video.

MengTo/Skills

Generate ElevenLabs text-to-speech audio from scripts or inline text using local voice profiles. Use when the user asks for ElevenLabs, text-to-speech, TTS, narration, voiceover, speech audio, or voice generation; load voice names, voice ids, emails, owners, and account-specific defaults only from local config outside the skill.

MengTo/Skills

Profile, audit, and optimize frontend page performance with emphasis on animation work, memory-leak risks, long-session slowdowns, CSS animations, canvas/WebGL requestAnimationFrame loops, marquees, skeletons, GSAP/Three/Matter effects, timers, listeners, and observers. Use when the user asks to make animations performant, pause offscreen animations, look for memory leaks, profile pages that slow the computer over time, fix janky scrolling, reduce CPU/GPU use, or repeat the "only play in view" optimization on React/Vite/Next/frontend pages using Codex Browser.

MengTo/Skills

Turn a reference video into a super detailed recreation or inspiration prompt. Use when the user provides, mentions, uploads, links, or points to a video and asks to analyze the design, UI, animations, transitions, scroll interactions, typography, colors, assets, WebGL/Three.js, storytelling, section-by-section behavior, or to create a prompt/article that recreates the page, app, interaction, or motion system.

MengTo/Skills

Create an on-scroll animation trigger using IntersectionObserver with Tailwind-friendly animation classes and keyframes. Use when asked for scroll-reveal, animate-on-scroll, or sequencing element animations when they enter the viewport.

MengTo/Skills

Create premium cinematic web motion systems with GSAP, ScrollTrigger, and Lenis. Use for luxury editorial websites, creative studio portfolios, Awwwards-style interactions, smooth scroll reveals, staggered text, parallax, pinned sections, magnetic hover states, custom cursors, and mouse-reactive layered movement.

MengTo/Skills

Create cinematic scroll-driven landing pages with Lenis smooth scrolling, GSAP ScrollTrigger, scroll-linked progression, staggered text reveals, sticky card stacks, parallax backgrounds, scroll-scrubbed transitions, footer reveals, and immersive preloaders. Use when analyzing or building premium editorial scroll experiences, sticky project stacks, kinetic typography, or section-by-section storytelling.

MengTo/Skills

Use when designing or rewriting a high-converting SaaS pricing page (structure, plan design, copywriting, SEO/AEO, FAQs, layout patterns, experiments). Includes checklists, templates, and common pitfalls.

MengTo/Skills

Use when creating or refining WebGL-heavy landing pages and you need to steer toward a specific visual outcome (premium, technical, playful, cinematic) while balancing conversion clarity, performance, and implementation complexity.

相关技能