ss-motion
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMotion Seed Applier
Motion Seed 应用手册
When NOT to use
不适用于以下场景
- For general framer-motion docs or learning → use the framer-motion site
- For non-React motion (CSS-only transitions, GSAP) — this skill targets JSX only
motion.X - For full scroll-linked timelines or parallax — out of scope for this skill (it does per-component seeds/moves). Note these ARE allowed on a marketing/landing/brand page (DESIGN-LANGUAGE §43 Cinematic tier); just build them with a scroll library, not this skill. On app/data surfaces they stay banned.
- For tweaking the existing FadeIn/FadeUp/Stagger wrappers — edit directly
engine/components/ui/motion.tsx
- 若需查阅framer-motion通用文档或学习相关知识 → 请访问framer-motion官方网站
- 非React动效(纯CSS过渡、GSAP)——本工具仅针对JSX组件
motion.X - 完整滚动关联时间轴或视差效果——超出本工具的适用范围(本工具仅处理单组件的种子/动效)。注意:此类效果在营销/落地/品牌页面中是允许的(参考DESIGN-LANGUAGE §43 电影级规范);只需使用滚动库直接构建,无需借助本工具。在应用/数据类界面中,此类效果仍被禁止。
- 如需调整现有FadeIn/FadeUp/Stagger包装组件——请直接编辑文件
engine/components/ui/motion.tsx
Vibe → Seed mapping
氛围感 → 动效种子映射
Translate the user's prompt to one of the five seeds before applying. Use this lookup table from :
engine/motion/index.ts| Words the user might say | Seed |
|---|---|
| bouncy, springy, playful, energetic, alive | Spring |
| smooth, silky, fluid, elegant, composed, continuous | Silk |
| snappy, quick, instant, decisive, sharp, precise | Snap |
| floaty, gentle, weightless, dreamy, ambient, drifting | Float |
| rhythmic, punchy, pulsing, heartbeat, beat | Pulse |
| "Toss style", "Arc style" | Spring (per brand default) |
| "Stripe style", "Notion style" | Silk |
| "Linear style", "Raycast style", "Vercel style" | Snap |
If the user says only a brand name, use that brand's default seed from . If the user is explicit about a seed name (, , etc.), respect it verbatim.
BRAND_DEFAULT_SEEDspringsilk在应用动效前,先将用户的需求描述转换为五种种子之一。请参考中的对照表:
engine/motion/index.ts| 用户可能使用的描述词 | 动效种子 |
|---|---|
| bouncy、springy、playful、energetic、alive | Spring |
| smooth、silky、fluid、elegant、composed、continuous | Silk |
| snappy、quick、instant、decisive、sharp、precise | Snap |
| floaty、gentle、weightless、dreamy、ambient、drifting | Float |
| rhythmic、punchy、pulsing、heartbeat、beat | Pulse |
| "抛射风格"、"弧线风格" | Spring(品牌默认设置) |
| "条纹风格"、"Notion风格" | Silk |
| "线性风格"、"Raycast风格"、"Vercel风格" | Snap |
如果用户仅提及品牌名称,请使用中该品牌对应的默认种子。如果用户明确指定了种子名称(如、等),请严格遵循用户的选择。
BRAND_DEFAULT_SEEDspringsilkRecommend mode — use-case → motion (when the user describes the moment, not the vibe)
推荐模式——场景 → 动效(当用户描述的是场景而非氛围感时)
If the user describes what the thing is ("a like button", "a modal", "the loading
state", "items in a feed") rather than a feeling, recommend from the use-case map
( in , exported from ):
MOTION_BY_USECASEengine/motion/library.ts@engine/motion| Use case | Reach for | Why |
|---|---|---|
| Primary button / CTA press | | tactile, confident — the press should "give" |
| Modal / dialog / sheet enter | | smooth; never bounce serious/destructive content |
| Dropdown / popover / menu | | instant, precise — frequent UI shouldn't wait |
| Toast / inline notification | | small friendly arrival, non-blocking |
| List / feed items appearing | | choreograph order, gently |
| Feature / marketing card hover | | depth/flair OK on content-light marketing |
| Dashboard / data card hover | | a subtle lift only — keep dense UI calm |
| Like / favorite / reaction | | a celebratory one-shot; reward the tap |
| Live / online / recording dot | | looping heartbeat = "alive" |
| Loading / skeleton | | calm directional progress |
| Success / confirmation | | positive little "done" |
| Toggle / tab / segment switch | | distinctive, recognizable switch |
| Page / route transition | | smooth, minimal, get out of the way |
| Number / balance / KPI / price reveal | none | don't animate the payload — it must read instantly |
Two anti-rules override the table (state them if you deviate):
- One seed per product. If the project already uses a seed, match it — don't introduce a second personality.
- Never delay the payload. Don't animate a balance, price, or search result into view; motion is for affordance, not content.
如果用户描述的是组件类型(如“点赞按钮”、“模态框”、“加载状态”、“信息流条目”)而非氛围感,请参考场景映射表(中的,从导出):
engine/motion/library.tsMOTION_BY_USECASE@engine/motion| 使用场景 | 推荐动效 | 原因 |
|---|---|---|
| 主按钮/CTA点击 | | 有触感、自信——点击时应有“反馈感” |
| 模态框/对话框/底部弹窗入场 | | 流畅;严肃/破坏性内容绝不使用弹跳效果 |
| 下拉菜单/弹出层/菜单 | | 即时、精准——高频UI不应让用户等待 |
| 提示框/内嵌通知 | | 小巧友好的入场效果,不阻塞操作 |
| 列表/信息流条目出现 | | 按顺序编排,柔和呈现 |
| 营销/功能卡片悬停 | | 在内容简洁的营销页面中,可增加深度/亮点 |
| 仪表盘/数据卡片悬停 | | 仅需轻微抬起——保持密集UI的沉稳感 |
| 点赞/收藏/互动反馈 | | 一次性的庆祝效果;响应用户点击 |
| 在线/直播/录制状态点 | | 循环心跳效果 = “活跃中” |
| 加载/骨架屏 | | 平稳的方向性进度提示 |
| 成功/确认提示 | | 积极的“完成”小动效 |
| 切换器/标签页/分段控件切换 | | 独特、易识别的切换效果 |
| 页面/路由过渡 | | 流畅、简洁,不干扰用户操作 |
| 数字/余额/KPI/价格展示 | 无 | 不要为核心内容添加动画——必须让用户立即读取信息 |
两条优先级更高的反规则(若偏离需向用户说明):
- 单个产品统一使用一种种子。若项目已使用某种子,需保持一致——不要引入第二种个性风格。
- 绝不延迟核心内容展示。不要为余额、价格或搜索结果添加入场动画;动效应用于交互提示,而非内容展示。
Named motion keywords (distinctive moves)
命名动效关键词(特色动效)
Seeds set a personality (how a fade/scale feels). The motion library in
adds distinctive moves — a flip, a curtain wipe, a
morph — each behind a unique keyword. Prefer a keyword when the user wants a
specific, recognizable motion rather than a generic feel.
engine/motion/library.tsengine/motion/library.tsMOTION_LIBRARYMOTION_BY_KEY@engine/motionsnippet| Keyword | Move | Say it when the user wants… |
|---|---|---|
| 3D Y-axis card flip | a switch/toggle to flip between two faces |
| slide-stack swap | a value to slide out and the next to slide in |
| pill ⇄ circle morph | a control to change shape on toggle |
| top→bottom clip-path wipe | a panel to reveal like a curtain |
| blur(12px)→0 focus-in | content to focus-pull into place |
| masked clip-path text rise | a headline/text to climb into view |
| scaleY from top edge | an accordion/panel to unfold |
| spring overshoot from 0 | a badge/checkmark to pop in bouncily |
| scale-down + skew | a button to feel jelly/tactile on tap |
| radial ripple from tap | Material-style press feedback |
| looping scale pulse | a live/recording/heartbeat indicator |
| quick horizontal shake | error / invalid-input feedback |
| skeleton loading sweep | a loading placeholder |
| children fade-up in sequence | a list to animate in one-by-one |
Applying a keyword:
- Read the exact recipe from — find the entry whose
engine/motion/library.tsmatches, copy itskeyverbatim (it is calibrated and runnable).snippet - Adapt only the element/content to the user's JSX; keep the transition values.
- If the keyword is stateful (toggles, ripple), wire the shown in the snippet. If it's a one-shot reveal, a
useStatebump replays it.key - Tell the user the keyword you applied so they can reuse it elsewhere for
consistency, and point them at to preview/Copy others.
/motion
If the user describes a move but no exact keyword fits, fall back to a seed +
context. If they say a keyword that doesn't exist, suggest the closest real one
from the table — never invent a keyword.
动效种子定义的是风格个性(淡入/缩放的感受)。动效库(位于)提供特色动效——翻转、幕布擦除、变形等,每个动效对应唯一关键词。当用户需要特定、可识别的动效而非通用风格时,优先使用关键词。
engine/motion/library.tsengine/motion/library.ts@engine/motionMOTION_LIBRARYMOTION_BY_KEYsnippet| 关键词 | 动效效果 | 适用场景 |
|---|---|---|
| 3D Y轴卡片翻转 | 用户需要在两个状态间通过翻转切换 |
| 滑动堆叠切换 | 用户需要让旧值滑出、新值滑入 |
| 胶囊形⇄圆形变形 | 用户需要控件在切换时改变形状 |
| 从上到下的裁剪路径擦除 | 用户需要像拉开幕布一样展示面板 |
| 从blur(12px)到清晰的聚焦效果 | 用户需要内容逐步聚焦呈现 |
| 蒙版裁剪路径下的文字上升 | 用户需要标题/文字向上滑入视野 |
| 从顶部边缘开始的Y轴缩放 | 用户需要折叠面板展开 |
| 从0开始的弹簧过冲效果 | 用户需要徽章/对勾弹跳式出现 |
| 缩小+倾斜 | 用户需要按钮点击时有果冻般的触感 |
| 点击位置的径向波纹 | Material风格的点击反馈 |
| 循环缩放脉冲 | 在线/录制/心跳状态指示器 |
| 快速水平抖动 | 错误/无效输入的反馈 |
| 骨架屏加载扫过效果 | 加载占位符 |
| 子元素依次淡入上移 | 列表逐个动画入场 |
应用关键词的步骤:
- 从中读取对应配方——找到
engine/motion/library.ts匹配的条目,直接复制其key代码块(已校准且可运行)。snippet - 仅根据用户的JSX调整元素/内容;保留过渡参数不变。
- 如果关键词涉及状态(切换器、波纹),请按照代码片段中的示例配置。如果是一次性展示效果,通过更新
useState值重新触发动画。key - 告知用户你所应用的关键词,以便他们在其他地方复用保证一致性,并引导他们访问页面预览/复制其他动效。
/motion
如果用户描述的动效没有完全匹配的关键词,退而动效种子+场景。如果用户提及的关键词不存在,建议使用表格中最接近的真实关键词——切勿自创关键词。
Context detection
场景上下文识别
Infer one of the five contexts from the prompt:
- "on hover" / "when hovered" →
hover - "on press" / "on tap" / "on click" →
press - "when it appears" / "on mount" / "entering" →
entrance - "when it leaves" / "on close" / "exiting" → (requires
exit)<AnimatePresence> - "when layout changes" / "FLIP" / "rearranging" →
layout
If ambiguous, default to . If multiple contexts are reasonable (e.g., a button needs both and ), apply both.
entrancehoverpress从用户的需求描述中推断以下五种上下文之一:
- "on hover" / "when hovered" → (悬停)
hover - "on press" / "on tap" / "on click" → (点击)
press - "when it appears" / "on mount" / "entering" → (入场)
entrance - "when it leaves" / "on close" / "exiting" → (退场,需配合
exit)<AnimatePresence> - "when layout changes" / "FLIP" / "rearranging" → (布局变化)
layout
若上下文不明确,默认使用。如果多个上下文合理(例如按钮同时需要和效果),则同时应用两种。
entrancehoverpressApplication steps
应用步骤
Apply seed: $0 · Context: $1 · Target: $ARGUMENTS
-
Read the target file at the path given (or, if no path was given, ask the user which file). Locate the JSX element the user is talking about — usually a,
<button>,<div>, or similar.<Card> -
Confirm the import paths. The component file must be able to import:
- (and
motionforAnimatePresence) fromexit"framer-motion" - the chosen seed from — in a project that doesn't use the
"@engine/motion"alias, use a relative path to@engine/*engine/motion
-
Replace the target tag with aand spread the seed's recipe:
<motion.X>tsx// hover example <motion.button {...spring.hover}>Save</motion.button> // press + hover combined <motion.button {...spring.press} {...spring.hover}>Save</motion.button> // entrance (mount) <motion.div {...silk.entrance}>...</motion.div> // exit (requires AnimatePresence wrapper somewhere up the tree) <AnimatePresence> {open && <motion.div {...silk.entrance} {...silk.exit} />} </AnimatePresence> // layout (FLIP) <motion.div {...snap.layout}>...</motion.div> -
Do NOT inline the params. The whole point of the seed is that the values come from one source. Never expandinto the JSX — always spread the recipe.
{ type: "spring", stiffness: 300, damping: 18 } -
Respectin long-running surfaces. For one-off interactions (hover/press), framer-motion already throttles. For mount/exit/layout sequences in a long-lived page, import
prefers-reduced-motionandusePrefersReducedMotionfromREDUCED_TRANSITIONand override the transition when reduced motion is on.@engine/motion -
Validate by re-reading the file and confirming the JSX still parses (matching brackets, motion tag closed, AnimatePresence in place ifwas used).
exit -
Tell the user which seed and context you applied, and offer one related context they might want next ("Wanttoo so it feels clickable?").
press
动效种子:$0 · 上下文:$1 · 目标:$ARGUMENTS
-
读取目标文件:根据给定路径读取文件(若未提供路径,请询问用户具体文件)。定位用户提及的JSX元素——通常是、
<button>、<div>等。<Card> -
确认导入路径:组件文件必须能够导入:
- 从导入
"framer-motion"(以及用于motion效果的exit)AnimatePresence - 从导入所选的动效种子——若项目未使用
"@engine/motion"别名,请使用相对路径指向@engine/*engine/motion
- 从
-
将目标标签替换为并展开种子配方:
<motion.X>tsx// 悬停示例 <motion.button {...spring.hover}>保存</motion.button> // 点击+悬停组合效果 <motion.button {...spring.press} {...spring.hover}>保存</motion.button> // 入场(挂载) <motion.div {...silk.entrance}>...</motion.div> // 退场(需在上级树中添加<AnimatePresence>包装) <AnimatePresence> {open && <motion.div {...silk.entrance} {...silk.exit} />} </AnimatePresence> // 布局变化(FLIP) <motion.div {...snap.layout}>...</motion.div> -
请勿内联参数。动效种子的核心价值在于参数来自单一可信源。切勿将展开到JSX中——始终使用展开配方的方式。
{ type: "spring", stiffness: 300, damping: 18 } -
尊重设置。对于长期运行的界面,若用户开启了减少动效设置,需适配。对于一次性交互(悬停/点击),framer-motion已自动处理。对于长期页面中的挂载/退场/布局序列,请从
prefers-reduced-motion导入@engine/motion和usePrefersReducedMotion,并在开启减少动效时覆盖过渡效果。REDUCED_TRANSITION -
验证:重新读取文件,确认JSX仍可正常解析(括号匹配、motion标签闭合、若使用则已添加AnimatePresence)。
exit -
告知用户你所应用的动效种子和上下文,并提供一个相关的后续建议(例如“是否需要添加效果让按钮更有点击感?”)。
press
Defaults if the user is vague
用户需求模糊时的默认规则
- No file given → ask "which file?"
- No vibe word → ask "any vibe word, brand, or seed name?"
- Vibe is "natural" or "feel like a real app" → default to Silk (the safest of the five)
- Element is a CTA button → also apply
press
- 未提供文件路径 → 询问“请指定文件路径?”
- 未提及氛围感描述 → 询问“是否有氛围感描述、品牌或种子名称?”
- 氛围感描述为“自然”或“像真实应用” → 默认使用Silk(五种种子中最稳妥的选择)
- 元素为CTA按钮 → 同时应用效果
press
Forbidden
禁止操作
- Do not invent new seed names. There are exactly five.
- Do not edit from this skill — those are calibrated by hand. Add a new seed only via a separate, explicit ask.
engine/motion/seeds/*.ts - Do not introduce a third-party animation lib (gsap, anime.js). StyleSeed targets framer-motion exclusively.
- Do not add scroll-linked, parallax, or infinite animations via this skill — it does per-component seeds/moves. (Scroll-linked/parallax/3D ARE allowed on a marketing/landing/brand page per DESIGN-LANGUAGE §43 Cinematic tier — build those directly with a scroll lib; on app/data surfaces they stay forbidden.) Infinite loops remain banned everywhere except skeleton pulse.
- 请勿自创新的种子名称。仅允许使用五种现有种子。
- 请勿通过本工具编辑文件——这些文件是手动校准的。如需添加新种子,请单独提交明确的需求。
engine/motion/seeds/*.ts - 请勿引入第三方动画库(gsap、anime.js)。StyleSeed仅针对framer-motion。
- 请勿通过本工具添加滚动关联、视差或无限循环动画——本工具仅处理单组件的种子/动效。(滚动关联/视差/3D效果在营销/落地/品牌页面中是允许的,参考DESIGN-LANGUAGE §43 电影级规范——请直接使用滚动库构建;在应用/数据类界面中,此类效果仍被禁止。无限循环动画除骨架屏脉冲外,其他场景均被禁止。)