microinteractions by wondelai/skills
npx skills add https://github.com/wondelai/skills --skill microinteractions一套系统化的方法,用于设计用户每天与之交互的那些微小、独立的产品瞬间——开关、密码字段、加载指示器、下拉刷新、点赞按钮。基于 Dan Saffer 的四部分结构(触发器、规则、反馈、循环与模式),此框架将无形的细节转化为区分平庸产品与受人喜爱产品的精妙之处。
一个你勉强接受的产品和一个你喜爱的产品之间的区别,几乎总是体现在微交互上。 微交互是围绕单一用例构建的独立产品瞬间:更改设置、同步数据、设置闹钟、选择密码。它们如此微小,以至于用户很少会主动思考它们——但他们能感受到。每个微交互都遵循相同的四部分结构:触发器启动它,规则决定发生什么,反馈显示正在发生什么,而循环与模式则定义其长期行为。
目标:10/10。 在评审或创建微交互时,根据对以下原则的遵循程度,以 0-10 分进行评分。10/10 意味着每个交互瞬间都有经过深思熟虑的触发器、清晰的规则、即时的反馈以及周到的循环/模式行为。较低的分数表示存在需要解决的差距。始终提供当前分数以及达到 10/10 所需的具体改进措施。
设计世界级微交互的六个关注领域:
核心概念: 触发器是启动微交互的因素。它可以是手动的(用户启动——点击、轻触、滑动、语音命令)或系统启动的(满足某个条件——时间、位置、数据接收、错误状态)。触发器是每个微交互的入口。
为何有效: 没有清晰的触发器,用户就无法发现或启动交互。没有系统触发器,产品就无法响应变化的条件。设计良好的触发器使功能易于发现,并为接下来要发生的事情设定准确的预期。
关键见解:
产品应用:
| 上下文 | 应用 | 示例 |
|---|---|---|
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 切换控件 |
| 具有二元状态的手动触发器 |
| iOS Wi-Fi 开关:点击切换,位置显示状态 |
| 下拉刷新 | 具有可见可供性的隐藏手势触发器 | 下拉超过阈值触发刷新动画 |
| 系统警报 | 条件满足时的系统触发器 | 电量低于 20% 阈值时发出低电量通知 |
| 搜索字段 | 带有自动建议系统触发器的手动触发器 | 输入启动搜索;结果作为系统触发器出现 |
| 悬停显示 | 使用接近度的手动触发器 | 工具栏操作在卡片悬停时出现 |
道德边界: 切勿在没有可见备用方案的情况下,将关键触发器隐藏在手势或不可见的交互之后。用户应始终能够发现基本功能。
核心概念: 规则决定微交互被触发后会发生什么。它们定义事件序列、对可以发生和不能发生之事的约束、处理输入的算法以及微交互何时结束。规则是看不见的逻辑——用户永远不会直接看到它们,但当规则出错时他们能感觉到。
为何有效: 规则创建了用户对交互如何运作的心智模型。当规则一致且符合预期时,交互感觉自然。当规则违背预期时——一个无法切换的开关、一个数值跳跃的滑块——用户会失去信任。
关键见解:
产品应用:
| 上下文 | 应用 | 示例 |
|---|---|---|
| 密码强度 | 规则实时评估输入 | 随着用户输入,强度计更新;颜色从红色变为绿色 |
| 字符计数器 | 规则约束并显示剩余字符 | Twitter/X:计数器递减,达到限制时变为红色 |
| 音量控制 | 规则将输入映射到输出并带有约束 | 滑块以 5% 为增量吸附;长按静音 |
| 购物车 | 规则管理数量和状态 | 不能低于 1;达到限制时显示"最多 10 个" |
| 撤销操作 | 规则设定撤销的时间窗口 | Gmail "撤销发送" 在 30 秒内可用 |
道德边界: 规则应该是透明且可预测的。不要创建操纵用户行为的隐藏规则,例如使退订比订阅需要更多步骤。
核心概念: 反馈将微交互的规则传达给用户。它回答:"现在正在发生什么?" 反馈可以是视觉的(颜色、动画、移动)、听觉的(点击声、提示音)或触觉的(振动)。关键约束是只显示重要的内容——最小化、有意义、情境化。
为何有效: 没有反馈,用户就无法判断他们的操作是否已注册、系统是否正在工作,或者操作是否成功。反馈弥合了评估鸿沟。反馈太少会产生焦虑;反馈太多会产生噪音。在正确的时间提供正确的反馈,使交互感觉响应迅速、值得信赖且充满活力。
关键见解:
产品应用:
| 上下文 | 应用 | 示例 |
|---|---|---|
| 按钮按下 | 点击时的视觉状态变化 | 按钮凹陷,颜色变化,文本变为"保存中..." |
| 表单验证 | 用户输入时的内联反馈 | 有效电子邮件字段旁出现绿色勾选标记 |
| 文件上传 | 带有百分比的进度指示器 | 进度条填充;显示百分比和预计时间 |
| 错误状态 | 靠近源头的上下文错误提示 | 字段红色边框 + 消息"密码必须为 8 个以上字符" |
| 成功确认 | 简短、非阻塞的确认 | 勾选动画替换提交按钮 1.5 秒 |
道德边界: 反馈应该是诚实的。不要使用虚假的进度条、操纵性的倒计时器或欺骗性的完成百分比来制造虚假的紧迫感。
核心概念: 循环决定微交互的元规则——随着时间的推移会发生什么。交互在第 100 次使用后会改变吗?它会过期吗?它会适应吗?模式是规则的分支——微交互行为不同的临时状态(例如,编辑模式与查看模式)。
为何有效: 永不发展的产品感觉陈旧。行为不可预测地变化的产品感觉不可靠。周到的循环让微交互优雅地成熟——为高级用户减少摩擦,同时对新用户保持可发现性。模式,如果谨慎使用,可以让单个控件服务于多个目的,而不会使界面混乱。
关键见解:
产品应用:
| 上下文 | 应用 | 示例 |
|---|---|---|
| 入门工具提示 | 长循环在使用 N 次后移除提示 | 前 3 次会话显示"滑动归档";然后停止 |
| 闹钟 | 开放循环每天重复,直到禁用 | 闹钟在每个工作日早上 7 点响起,直到关闭 |
| 文本编辑 | 模式:查看与编辑 | 横幅显示"编辑中",并带有"完成"按钮以退出模式 |
| 智能默认值 | 长循环学习偏好 | 电子邮件应用学习到你总是抄送你的经理;建议这样做 |
| 通知频率 | 长循环适应推送频率 | 如果用户连续忽略 5 条通知,则减少通知 |
道德边界: 循环应该有益于用户,而不是企业。不要使用自适应循环来增加通知频率或使退出选项逐渐变得更难。
核心概念: 标志性时刻是一种如此独特的微交互,以至于它成为产品身份的一部分。它将功能性需求转化为定义品牌的细节——Facebook 的点赞大拇指、iPhone 的滑动解锁、Slack 的加载消息。并非每个微交互都应该是标志性时刻,但每个产品都应该有一两个。
为何有效: 标志性时刻创造情感记忆。它们让产品感觉是精心制作的,而不是组装起来的。当用户向他人描述你的产品时,标志性时刻是他们首先展示的内容。它们将实用性转化为个性。
关键见解:
产品应用:
| 上下文 | 应用 | 示例 |
|---|---|---|
| 社交反应 | 对互动的动画响应 | Facebook 点赞:大拇指动画带有粒子效果 |
| 加载状态 | 品牌化的等待体验 | Slack:加载期间旋转显示的引言 |
| 完成确认 | 庆祝性的确认 | Stripe 支付:带有五彩纸屑的动画勾选标记 |
| 空状态 | 在内容缺失时展现个性 | Dropbox:带有友好文案的插画场景 |
| 错误恢复 | 具有个性的优雅失败处理 | GitHub 404:视差效果的 Octocat 插画 |
道德边界: 标志性时刻绝不应掩盖重要信息或为了展示动画而延迟用户。功能永远优先于愉悦感。
核心概念: 最好的微交互是用户几乎注意不到的,因为它如此简单和快速。精简意味着做得更少——更少的选项、更少的步骤、更少的决策。简化意味着让剩余的部分感觉毫不费力。目标是将每个微交互提炼到其绝对本质。
为何有效: 每个选项、字段和决策都会增加认知负荷。用户不想配置一个开关。他们希望开关能工作。精简在最细微的层面上对抗功能蔓延。最优雅的微交互具有零配置、一个操作和即时结果。
关键见解:
产品应用:
| 上下文 | 应用 | 示例 |
|---|---|---|
| 智能默认值 | 消除配置 | 相机应用默认进入拍照模式,而非设置 |
| 内联编辑 | 移除模态框,就地编辑 | 电子表格单元格:点击编辑,按 Enter 保存 |
| 自动检测 | 系统处理而非用户处理 | 根据前几位数字检测信用卡类型 |
| 单一操作 | 一次点击替代多步骤流程 | 双击点赞,而不是打开菜单、选择反应 |
| 预期性设计 | 预测并预填充 | 根据邮政编码预填充城市和州 |
道德边界: 简化不应剥夺用户对有意义的选择的控制权。不要自动将用户加入那些以牺牲用户利益为代价而有利于企业的功能。
参见:references/trigger-design.md 以了解如何降低触发器复杂性。
| 错误 | 为何失败 | 修复方法 |
|---|---|---|
| 操作无反馈 | 用户不知道他们的点击是否已注册 | 为每个交互元素添加即时视觉状态变化 |
| 过度设计简单时刻 | 复杂的动画会减慢频繁操作的速度 | 为不频繁、高影响力的时刻保留丰富的动画 |
| 忽略边缘情况 | 交互在零值、最大值或双击时中断 | 映射每个状态:空、加载、部分、满、错误、禁用 |
| 不可见的触发器 | 用户无法发现功能 | 将手势触发器与可见的替代方案配对 |
| 模式错误 | 相同的操作根据隐藏状态产生不同的结果 | 使当前模式可见;最小化模式数量 |
| 忽略长循环 | 交互在第 1 天和第 100 天感觉相同 | 使用渐进式简化来为回头客优化流程 |
| 反馈过载 | 每个操作都会触发提示、声音或动画 | 使用能传达信息的最小反馈;为大事件保留大反馈 |
| 虚假进度指示器 | 当用户发现进度条是假的时,会感到被欺骗 | 使用诚实、确定的进度;在未知时显示不确定的旋转器 |
审计任何微交互:
| 问题 | 如果答案为"否" | 行动 |
|---|---|---|
| 是否有清晰、可发现的触发器? | 用户无法启动交互 | 添加可见的控件或可供性 |
| 触发器是否显示其当前状态? | 用户无法判断它是开启、关闭还是加载中 | 为每个触发器状态添加不同的视觉状态 |
| 规则是否简单且可预测? | 用户对所发生的事情感到困惑 | 简化规则;匹配平台惯例 |
| 是否有即时反馈? | 用户质疑他们的操作是否有效 | 在 100 毫秒内添加视觉响应 |
| 反馈是否与事件的重要性相匹配? | 小操作感觉夸张或大操作感觉微不足道 | 根据事件重要性调整反馈的规模 |
| 交互是否随时间演变? | 高级用户仍然看到初学者提示 | 通过长循环添加渐进式简化 |
| 交互是否没有不必要的模式? | 用户在错误的模式下执行错误的操作 | 移除模式或使当前模式高度可见 |
| 首次使用的用户能否在没有帮助的情况下弄明白? | 交互需要解释 | 简化或通过长循环添加一次性提示 |
此技能基于 Dan Saffer 的权威指南,该指南阐述了区分优秀产品与卓越产品的细节设计:
Dan Saffer 是一位设计师、作家和设计领导者,曾在 Twitter、Jawbone 和 Smart Design 领导设计团队。他以在细节层面的交互设计工作而闻名——这些微小、独立的瞬间构成了用户体验的大部分。《微交互》编纂了一个框架,被全球公司的设计团队用来审计、设计和改进那些使产品感觉精致和充满活力的小细节。Saffer 还著有《Designing for Interaction》和《Designing Gestural Interfaces》,并定期在设计会议上就交互设计的技艺发表演讲。
每周安装量
241
代码仓库
GitHub 星标数
255
首次出现
2026 年 2 月 23 日
安全审计
安装于
codex230
opencode227
gemini-cli224
github-copilot224
cursor224
kimi-cli223
A systematic approach to designing the tiny, contained product moments that users interact with every day -- toggles, password fields, loading indicators, pull-to-refresh, like buttons. Based on Dan Saffer's four-part structure (Trigger, Rules, Feedback, Loops & Modes), this framework turns invisible details into the polish that separates forgettable products from beloved ones.
The difference between a product you tolerate and a product you love is almost always in the microinteractions. A microinteraction is a contained product moment built around a single use case: changing a setting, syncing data, setting an alarm, picking a password. They are so small that users rarely think about them consciously -- but they feel them. Every microinteraction follows the same four-part structure: a Trigger initiates it, Rules determine what happens, Feedback shows what is happening, and Loops & Modes define its long-term behavior.
Goal: 10/10. When reviewing or creating microinteractions, rate them 0-10 based on adherence to the principles below. A 10/10 means every interactive moment has a deliberate trigger, clear rules, immediate feedback, and thoughtful loop/mode behavior. Lower scores indicate gaps to address. Always provide the current score and specific improvements needed to reach 10/10.
Six areas of focus for designing world-class microinteractions:
Core concept: The trigger is what initiates a microinteraction. It can be manual (user-initiated -- a tap, click, swipe, voice command) or system-initiated (a condition is met -- time, location, incoming data, error state). The trigger is the front door of every microinteraction.
Why it works: Without a clear trigger, users cannot discover or initiate the interaction. Without a system trigger, the product cannot respond to changing conditions. Well-designed triggers make functionality discoverable and set accurate expectations for what will happen next.
Key insights:
Product applications:
| Context | Application | Example |
|---|---|---|
| Toggle controls | Manual trigger with binary state | iOS Wi-Fi switch: tap to toggle, position shows state |
| Pull-to-refresh | Hidden gesture trigger with visible affordance | Pulling down past threshold triggers refresh animation |
| System alerts | System trigger on condition met | Low battery notification at 20% threshold |
| Search fields | Manual trigger with auto-suggest system trigger | Typing initiates search; results appear as system trigger |
| Hover reveals | Manual trigger using proximity | Toolbar actions appear on card hover |
Ethical boundary: Never hide critical triggers behind gestures or invisible interactions without a visible fallback. Users should always be able to discover essential functionality.
See: references/trigger-design.md
Core concept: Rules determine what happens once a microinteraction is triggered. They define the sequence of events, the constraints on what can and cannot happen, the algorithm that processes input, and when the microinteraction ends. Rules are the invisible logic -- users never see them directly, but they feel when rules are wrong.
Why it works: Rules create the mental model users build about how the interaction works. When rules are consistent and match expectations, the interaction feels natural. When rules violate expectations -- a toggle that does not toggle, a slider that jumps in value -- users lose trust.
Key insights:
Product applications:
| Context | Application | Example |
|---|---|---|
| Password strength | Rules evaluate input in real-time | Meter updates as user types; color shifts from red to green |
| Character counter | Rule constrains and displays remaining | Twitter/X: counter decreases, turns red at limit |
| Volume control | Rule maps input to output with constraints | Slider snaps to 5% increments; long-press mutes |
| Shopping cart | Rules manage quantity and state | Cannot go below 1; shows "max 10" at limit |
| Undo action | Rule sets time window for reversal | Gmail "Undo send" available for 30 seconds |
Ethical boundary: Rules should be transparent and predictable. Do not create hidden rules that manipulate user behavior, such as making unsubscribe require more steps than subscribe.
See: references/rules-and-state.md
Core concept: Feedback communicates the rules of the microinteraction to the user. It answers: "What is happening right now?" Feedback can be visual (color, animation, movement), auditory (clicks, chimes), or haptic (vibrations). The key constraint is showing only what matters -- minimal, meaningful, contextual.
Why it works: Without feedback, users cannot tell if their action registered, if the system is working, or if the operation succeeded. Feedback closes the Gulf of Evaluation. Too little feedback creates anxiety; too much creates noise. The right feedback at the right time makes interactions feel responsive, trustworthy, and alive.
Key insights:
Product applications:
| Context | Application | Example |
|---|---|---|
| Button press | Visual state change on click | Button depresses, color shifts, text changes to "Saving..." |
| Form validation | Inline feedback as user types | Green checkmark appears next to valid email field |
| File upload | Progress indicator with percentage | Progress bar fills; percentage and estimated time shown |
| Error state | Contextual error near the source | Red border on field + message "Password must be 8+ characters" |
| Success confirmation | Brief, non-blocking affirmation | Checkmark animation replaces submit button for 1.5 seconds |
Ethical boundary: Feedback should be honest. Do not use fake progress bars, manipulative countdown timers, or deceptive completion percentages to create false urgency.
See: references/feedback-patterns.md
Core concept: Loops determine the meta-rules of a microinteraction -- what happens over time. Does the interaction change after the 100th use? Does it expire? Does it adapt? Modes are forks in the rules -- temporary states where the microinteraction behaves differently (e.g., edit mode vs. view mode).
Why it works: Products that never evolve feel stale. Products that shift behavior unpredictably feel unreliable. Thoughtful loops let microinteractions mature gracefully -- reducing friction for power users while remaining discoverable for new ones. Modes, when used sparingly, let a single control serve multiple purposes without cluttering the interface.
Key insights:
Product applications:
| Context | Application | Example |
|---|---|---|
| Onboarding tooltips | Long loop removes hints after N uses | First 3 sessions show "Swipe to archive"; then stop |
| Alarm clock | Open loop repeats daily until disabled | Alarm fires every weekday at 7am until toggled off |
| Text editing | Mode: view vs. edit | Banner reads "Editing" with a "Done" button to exit mode |
| Smart defaults | Long loop learns preferences | Email app learns you always CC your manager; suggests it |
| Notification frequency | Long loop adapts delivery | Reduces notifications if user ignores 5 in a row |
Ethical boundary: Loops should benefit the user, not the business. Do not use adaptive loops to increase notification frequency or make opt-outs progressively harder.
See: references/loops-modes.md
Core concept: A signature moment is a microinteraction so distinctive that it becomes part of the product's identity. It transforms a functional necessity into a brand-defining detail -- the Facebook Like thumbs-up, the iPhone slide-to-unlock, Slack's loading messages. Not every microinteraction should be a signature moment, but every product should have one or two.
Why it works: Signature moments create emotional memory. They make products feel crafted rather than assembled. When users describe your product to others, signature moments are what they demonstrate first. They turn utility into personality.
Key insights:
Product applications:
| Context | Application | Example |
|---|---|---|
| Social reaction | Animated response to engagement | Facebook Like: thumbs-up animates with particles |
| Loading state | Branded waiting experience | Slack: rotating quotes during load |
| Completion | Celebratory confirmation | Stripe payment: animated checkmark with confetti |
| Empty state | Personality in absence of content | Dropbox: illustrated scenes with friendly copy |
| Error recovery | Graceful failure with personality | GitHub 404: parallax Octocat illustration |
Ethical boundary: Signature moments should never obscure important information or delay the user to show off an animation. Function always precedes delight.
See: references/signature-moments.md
Core concept: The best microinteraction is one the user barely notices because it is so simple and fast. Reduction means doing less -- fewer options, fewer steps, fewer decisions. Simplifying means making what remains feel effortless. The goal is to distill every microinteraction to its absolute essence.
Why it works: Every option, field, and decision adds cognitive load. Users do not want to configure a toggle switch. They want the toggle to work. Reduction fights feature creep at the smallest level. The most elegant microinteractions have zero configuration, one action, and immediate results.
Key insights:
Product applications:
| Context | Application | Example |
|---|---|---|
| Smart defaults | Eliminate configuration | Camera app defaults to photo mode, not settings |
| Inline editing | Remove modal, edit in place | Spreadsheet cell: click to edit, Enter to save |
| Auto-detection | System handles instead of user | Credit card type detected from first digits |
| Single action | One tap replaces multi-step flow | Double-tap to like instead of open menu, select reaction |
| Anticipatory design | Predict and pre-fill | Shipping form pre-fills city and state from ZIP code |
Ethical boundary: Simplification should not remove user control over meaningful choices. Do not auto-opt users into features that benefit the business at the user's expense.
See: references/trigger-design.md for reducing trigger complexity.
| Mistake | Why It Fails | Fix |
|---|---|---|
| No feedback on action | Users do not know if their tap registered | Add immediate visual state change to every interactive element |
| Overdesigning simple moments | Complex animations slow down frequent actions | Reserve rich animation for infrequent, high-impact moments |
| Ignoring edge cases | Interaction breaks at zero, at max, or on double-tap | Map every state: empty, loading, partial, full, error, disabled |
| Invisible triggers | Users cannot discover functionality | Pair gesture triggers with a visible alternative |
| Mode errors | Same action produces different results depending on hidden state | Make current mode visible; minimize number of modes |
| Ignoring long loops | Interaction feels the same on day 1 and day 100 | Use progressive reduction to streamline for returning users |
Audit any microinteraction:
| Question | If No | Action |
|---|---|---|
| Is there a clear, discoverable trigger? | Users cannot initiate the interaction | Add a visible control or affordance |
| Does the trigger show its current state? | Users cannot tell if it is on, off, or loading | Add distinct visual states for every trigger state |
| Are the rules simple and predictable? | Users are confused by what happened | Simplify rules; match platform conventions |
| Is there immediate feedback? | Users question whether their action worked | Add visual response within 100ms |
| Does feedback match the significance of the event? | Small actions feel dramatic or big actions feel trivial | Scale feedback to match event importance |
| Does the interaction evolve over time? | Power users are still seeing beginner hints | Add progressive reduction through long loops |
| Is the interaction free of unnecessary modes? | Users perform wrong action in wrong mode | Remove modes or make current mode highly visible |
| Could a first-time user figure it out without help? |
This skill is based on Dan Saffer's definitive guide to designing the details that separate good products from great ones:
Dan Saffer is a designer, author, and design leader who has led design teams at Twitter, Jawbone, and Smart Design. He is known for his work on interaction design at the detail level -- the small, contained moments that make up the bulk of user experience. Microinteractions codified a framework that design teams at companies worldwide use to audit, design, and improve the small details that make products feel polished and alive. Saffer has also authored Designing for Interaction and Designing Gestural Interfaces , and he speaks regularly at design conferences on the craft of interaction design.
Weekly Installs
241
Repository
GitHub Stars
255
First Seen
Feb 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex230
opencode227
gemini-cli224
github-copilot224
cursor224
kimi-cli223
前端设计技能指南:避免AI垃圾美学,打造独特生产级界面
36,100 周安装
| Every action triggers a toast, sound, or animation |
| Use the smallest feedback that communicates; reserve big feedback for big events |
| Fake progress indicators | Users feel deceived when they discover the bar is fake | Use honest, deterministic progress; show indeterminate spinner when unknown |
| Interaction needs explanation |
| Simplify or add a one-time hint via long loop |