Skip to main content
skill CX Codex

fitts-law — Claude Code skill: size and place UI targets

A skill that makes your coding agent size and position controls by Fitts's Law. Useful when building touch interfaces or auditing mis-taps.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Owl-Listener/designer-skills --skill fitts-law -a claude-code
Open on GitHub

What fitts-law does

The skill teaches the agent that target acquisition time depends on distance and target size, following MT = a + b × log₂(2D / W). It hands over concrete numbers: 44×44pt minimum for touch per Apple HIG, 48×48dp per Material Design, 24×24px for pointer targets. Size means the interactive area, so a 16px icon can still carry a 44px tap zone.

It also covers placement patterns — primary CTA, floating action button, bottom navigation, modal actions, form submit, close and destructive buttons. Screen edges and corners get a mention as effectively infinite targets, since the pointer cannot overshoot them. Destructive actions get the opposite advice: keep them small and far from everything else.

The skill is upfront about what the model misses. It measures motor time, not the time to decide what to tap, so a well-placed button with a confusing label still fails. Gestures and scroll zones follow the same size-and-distance logic, but accidental activation risk sits outside the formula. Test tap targets on a real device — what looks fine in a design tool often feels small in hand.

What it helps with

  • pick a tap target size that works with a thumb
  • place the primary action inside thumb reach
  • keep a destructive button away from everything else
  • grow a small icon's hit area with padding
  • figure out why users keep missing a control

Example prompts for the agent

  • check the button sizes and positions on this screen against Fitts's Law
  • make the tap targets in this mobile layout at least 44×44pt
  • where should the primary action go in this modal?

How to install fitts-law

1Skills CLI (Vercel)

npx skills add Owl-Listener/designer-skills --skill fitts-law -a claude-code

2Manually: put the files in place

~/.claude/skills/fitts-law/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/fitts-law/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about fitts-law

How do I install fitts-law in Claude?

Run npx skills add Owl-Listener/designer-skills --skill fitts-law -a claude-code. The skill lands at ~/.claude/skills/fitts-law/SKILL.md.

What does fitts-law do?

It gives the agent rules for sizing and positioning interactive targets based on Fitts's Law, covering tap zones, button placement and navigation.

How is fitts-law different from hicks-law?

fitts-law handles target size and distance; hicks-law handles how many controls to show at once. The author points to hicks-law when the question is about count.

Source text

SKILL.md · MIT
---
name: fitts-law
description: Apply Fitts's Law — target acquisition time depends on size and distance. Use when sizing and positioning controls, especially for touch. For how many controls to show at once, use `hicks-law`.
---
# Fitts's Law
You are an expert in the relationship between target size, distance, and interaction accuracy.
## What You Do
You apply Fitts's Law to ensure interactive targets are sized and positioned to minimize the time and effort required to reach and activate them.
## The Principle
The time to acquire a target is a function of **distance to the target** and **target size**:
`MT = a + b × log₂(2D / W)`
Where: MT = movement time, D = distance to target, W = width of target, a/b = empirically derived constants.
**In plain terms:** large targets close to the pointer are fast to hit; small targets far away are slow and error-prone. Both dimensions — size and proximity — matter independently.
## Practical Implications
### Target Size
- Minimum touch target: **44×44pt** (Apple HIG) / **48×48dp** (Material Design) for touch interfaces
- Pointer targets can be smaller but should still be generous — 24×24px minimum for pointer, more for small or dense UIs
- Target size is the interactive area, not the visual icon — a 16px icon can have a 44px tap area
- Increase size for high-frequency or high-consequence actions (primary CTA, destructive confirm)
### Target Distance
- Place related actions near the content they act on — a card action should live on the card, not across the screen
- Edges and corners of the screen are infinite-size targets (pointer cannot overshoot) — use them for persistent navigation (macOS menu bar, Windows taskbar)
- On mobile, bottom-of-screen placement reduces reach distance for right-hand thumb use
- Dialogs with confirmation actions should not require crossing the full screen to reach "OK"
### What Fitts's Law Does Not Cover
- **Cognitive cost**: it models motor time, not the time to decide what to tap. A perfectly sized, well-positioned button still fails if the label is ambiguous.
- **Touch accuracy vs pointer accuracy**: touch has a larger contact zone and is less precise; pointer mechanics differ. The law applies to both but parameters vary.
- **Gesture targets**: swipe areas, drag handles, and scroll zones follow the same principles (bigger + closer = faster) but interact with accidental activation risk in ways the basic model doesn't capture.
## Common Design Applications
| Pattern | Fitts's Law Application |
|---|---|
| Primary CTA | Large, high-contrast, positioned in thumb reach zone |
| Floating action button | Bottom-right on mobile — close to dominant thumb |
| Navigation tabs | Bottom nav on mobile beats top nav for one-handed use |
| Modal actions | Buttons near bottom of modal, not scattered |
| Form submit | Full-width or prominent button below the last field |
| Close button | Large enough hit target; consider bottom dismiss on mobile |
| Destructive action | Small and distant to prevent accidental activation |
## Best Practices
- Always test tap target size on real devices — what looks adequate in design tools is often too small in hand
- Use padding, not visual size, to expand hit targets
- Do not apply Fitts's Law in isolation to justify oversized buttons; balance with visual hierarchy and spacing
- On desktop, exploit screen edges for persistent navigation; don't waste them
- Audit high-error interactions (mis-taps, mis-clicks) first — they are almost always Fitts's Law failures

© Owl-Listener · MIT · Owl-Listener/designer-skills

Similar skills

Everything for Design →

From the same set109

design-system-governance This skill lays out how a design system changes over time: ownership, contribution, versioning, deprecation. It fits teams where more than one group ships components. CX Codex +1 1,700installs design-debt-audit Takes stock of accumulated design inconsistencies across a product and returns a prioritised fix plan. Useful once drift has built up over time. CX Codex +1 1,700installs von-restorff-effect This skill guides coding agents to isolate a single primary action on a screen using visual contrast. It applies when one choice must grab attention immediately. CX Codex +1 1,700installs hicks-law A skill that applies Hick's Law — decision time grows with the number of simultaneous choices. Useful when a screen throws too many options at the user. CX Codex +1 1,700installs readable-measure Sets optimal typographic measure and line length across screen breakpoints. Helps maintain reading comfort in body copy, articles, and UI descriptions. CX Codex +1 1,700installs localization-design Helps design UI for different languages, writing directions, and cultural contexts before translations arrive. CX Codex +1 1,700installs law-of-common-region A Gestalt skill that tells your agent when to group elements with a container, background or border instead of spacing alone. CX Codex +1 1,700installs survey-design Guides the creation of unbiased survey questions, rating scales, and sample sizing. Ideal when validating user opinions with quantitative data. CX Codex +1 1,700installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor