Communitygithub.com

Fitts定律技能

应用Fitts定律来调整交互目标的大小和位置,实现快速、精确的交互。

Fitts定律技能 是什么?

该技能将Fitts定律应用于用户界面设计,指导开发者根据目标大小和距离优化交互元素的布局。Fitts定律指出,到达目标所需的时间与目标距离的对数成正比,与目标大小的对数成反比。技能覆盖了触摸和指针设备的最小目标尺寸(如44×44pt和24×24px),并建议将高频率或高风险的操作设为大而近的目标,而将破坏性操作设得小而远。同时,技能也说明了Fitts定律的局限性,如未考虑认知成本和手势交互。适用于移动端、桌面端和Web界面,帮助设计师和开发者提升交互效率、减少误操作。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Infrasity-Labs/dev-gtm-claude-skills/tree/HEAD/.claude/skills/fitts-law

在你喜欢的 AI 中提问

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

文档

Fitts定律

您是一位在目标大小、距离与交互准确性之间关系方面的专家。

您的工作

您应用Fitts定律确保交互目标的大小和位置能够最小化到达并激活它们所需的时间和精力。

原理

获取目标的时间与到目标的距离和目标大小成函数关系: MT = a + b × log₂(2D / W) 其中:MT = 移动时间,D = 距离目标的距离,W = 目标的宽度,a/b = 经验推导的常数。 通俗地说: 靠近指针的大型目标容易快速命中;远离指针的小型目标则速度慢、容易出错。大小和距离这两个维度各自独立地起作用。

实际应用

目标大小

  • 最小触摸目标:触摸界面为44×44pt(Apple HIG)/ 48×48dp(Material Design)
  • 指针目标可以更小,但应保持充裕——指针最小为24×24px,对于密集或小型UI,建议更大
  • 目标大小是交互区域,而非视觉图标——一个16px的图标可以拥有44px的触摸区域
  • 对于高频或高后果操作(如主要操作按钮、破坏性确认),应增大目标大小

目标距离

  • 将相关操作靠近其作用的内容放置——卡片操作应位于卡片上,而非屏幕另一端
  • 屏幕边缘和角落是无限大小的目标(指针无法过度移动)——用于持久导航(macOS菜单栏、Windows任务栏)
  • 在移动端,屏幕底部放置可减少右手拇指操作时的到达距离
  • 包含确认操作的对话框不应要求用户横跨整个屏幕来点击“确定”

Fitts定律未覆盖的内容

  • 认知成本:它模拟的是运动时间,而非决定点击什么的时间。一个大小合适、位置恰当的按钮如果标签模糊,仍然会失败。
  • 触摸精度与指针精度:触摸具有更大的接触区域且精度较低;指针的力学机制不同。该定律适用于两者,但参数有所不同。
  • 手势目标:滑动区域、拖动柄和滚动区域遵循相同的原理(更大+更近=更快),但会与意外激活风险交互,基础模型无法完全涵盖。

常见设计应用

模式Fitts定律应用
主要操作按钮大尺寸、高对比度、位于拇指可达区域
浮动操作按钮移动端右下角——靠近主要拇指
导航标签移动端底部导航优于顶部导航,适合单手操作
模态框操作按钮靠近模态框底部,而非分散放置
表单提交全宽度或突出按钮位于最后一个字段下方
关闭按钮足够大的点击目标;考虑移动端底部关闭
破坏性操作小而远,以防止意外激活

最佳实践

  • 始终在真实设备上测试触摸目标大小——设计工具中看起来足够的大小,在实际手中往往过小
  • 使用内边距(而非视觉大小)来扩展点击目标
  • 不要孤立地应用Fitts定律来证明超大按钮的合理性;需与视觉层次和间距保持平衡
  • 在桌面端,利用屏幕边缘进行持久导航;不要浪费它们
  • 首先审查高误触交互(误点击、误操作)——它们几乎都是Fitts定律失败的情况

Individual skills in this repo

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

Infrasity-Labs/dev-gtm-claude-skills

Translate existing blog posts into one or more target languages with SEO-optimized localization. Produces native-quality translations that preserve markdown structure, frontmatter, schema JSON-LD, image and chart embeds, and citation capsules. Localizes keywords, meta tags, numbers, dates, currencies, and quote styles per locale. Flags machine-translation artifacts for review. Run BEFORE blog-localize: this handles language conversion; localize handles cultural adaptation after translation completes. Use when user says "translate blog", "blog translate", "uebersetzen", "traduire", "traducir", "translate post", "blog auf Deutsch", "blog en espanol".

Infrasity-Labs/dev-gtm-claude-skills

Balance visual design with ATS compatibility for creative roles

Infrasity-Labs/dev-gtm-claude-skills

When the user wants to plan a product launch, feature announcement, or release strategy. Also use when the user mentions 'launch,' 'Product Hunt,' 'feature release,' 'announcement,' 'go-to-market,' 'beta launch,' 'early access,' 'waitlist,' 'product update,' 'how do I launch this,' 'launch checklist,' 'GTM plan,' or 'we're about to ship.' Use this whenever someone is preparing to release something publicly. For ongoing marketing after launch, see marketing-ideas.

Infrasity-Labs/dev-gtm-claude-skills

Design interfaces that adapt gracefully to multiple languages, writing directions, and cultural contexts.

Infrasity-Labs/dev-gtm-claude-skills

Create platform-specific social media posts for LinkedIn, Facebook, Instagram, and Reddit. Handles character limits, hashtag strategies, hook placement, and image specs per platform. Works from scratch, from existing content (blog, newsletter, announcement), or as a multi-platform campaign. Produces copy-paste-ready posts. Triggers: 'social media post', 'linkedin post', 'facebook post', 'instagram caption', 'reddit post', 'social posts', 'post to social', 'repurpose for social', 'social media campaign'.

Infrasity-Labs/dev-gtm-claude-skills

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

Infrasity-Labs/dev-gtm-claude-skills

Transform resume bullets into detailed portfolio case studies

Infrasity-Labs/dev-gtm-claude-skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

Infrasity-Labs/dev-gtm-claude-skills

Audits any landing or service page across 48 checks in 10 categories for LLM/AI discoverability, GEO readiness, content clarity, schema markup, internal linking, freshness signals, and technical crawlability. Produces an overall score out of 100, a per-category score out of 100, pass/warn/fail/ manual counts, and a prioritised fix list — all rendered as a standalone HTML report saved to disk. Use when a user provides a URL and asks to audit it, score it, check its GEO readiness, test its AI discoverability, run a landing page audit, or evaluate it for LLM citation potential. Also trigger on phrases like "audit this page", "score this URL", "check GEO for", "is this page AI-ready", "run a GEO audit", "LLM page check", "how would AI read this page", or "landing page score".

相关技能