/ui-ux-design-principles:ui-ux-interaction-layout-and-visual-designfrom ui-ux-design-principles
Covers interaction design (touch, mouse, keyboard, voice, stylus), layout (responsive/adaptive, container queries, grid, foldables), and visual design (typography, color, space, motion, perceived performance). Part of a UI/UX design principles reference set.
Ships in ui-ux-design-principles. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Part 2 of 5 of the UI/UX Design Principles — Mobile, Tablet, Web, Desktop reference (plugin
ui-ux-design-principles), covering §4–§6. Sibling skills:ui-ux-cognition-heuristics-and-navigation(§0–§3),ui-ux-design-systems-platforms-and-accessibility(§7–§9),ui-ux-writing-forms-research-and-ethics(§10–§14),ui-ux-reference(§15–§20). Section numbers are shared across the set; a reference written as §N →skillpoints into that sibling skill.Currency: Verified August 2026. See §17 →
ui-ux-referencefor the currency snapshot and what goes stale first.Related: Overlaps the
frontend-design:graphic-ux-ui-designskill. That one is oriented to implementation-time component and token decisions; this one is oriented to design reasoning, cross-form-factor principles, research method, and the regulatory landscape. Use both.
How to read this. Reference, not tutorial. Sections are independent. Three markers:
- [DURABLE] — grounded in perception, cognition, motor control, or decades of replicated research. Does not expire. Trust it.
- [PLATFORM] — a convention of Apple, Google, Microsoft, GNOME/KDE, or the web. Verify against the current HIG; these change.
- [CONTESTED] — competent practitioners disagree, or the evidence is thinner than the confidence with which it's usually asserted. Both cases given.
⚠️ GOTCHA boxes mark the mistakes that survive design review and get caught in production, in court, or in the analytics.
The framing that organizes everything below: an interface is a proposal about how a person should think. Good design makes the proposal match how they already think. Every principle in this document is a specialization of that idea — to a thumb, a screen size, a screen reader, a legal regime, or an attention budget.
| Touch | Mouse/trackpad | Keyboard | Voice | Stylus | |
|---|---|---|---|---|---|
| Precision | Low (~9 mm) | High (1 px) | N/A (discrete) | N/A | Very high |
| Hover state | None | Yes | Focus | No | Hover on some |
| Right-click / secondary | Long-press | Yes | Context key | No | Barrel button |
| Multi-select | Awkward; needs a mode | Shift/Ctrl-click, marquee | Shift+arrows | No | Lasso |
| Precision editing | Painful | Good | Excellent | Poor | Excellent |
| Occlusion | Hand covers content | None | None | None | Hand covers |
| Discoverability | Poor (gestures invisible) | Medium | Poor without hints | Very poor | Poor |
[DURABLE] The absence of hover on touch is a structural problem, not a detail. Every
tooltip, every "reveal on hover" action, every hover-based preview has no touch equivalent.
Designing hover-dependent affordances means designing a desktop-only feature. And on hybrid
devices (touchscreen laptops, iPad + trackpad), both are possible simultaneously — so
design for the capability, not the device class (@media (hover: hover) and
(pointer: coarse|fine) exist for exactly this).
| Standard | Minimum | Nature |
|---|---|---|
| WCAG 2.2 SC 2.5.8 (AA) | 24 × 24 CSS px — or smaller with ≥24 px spacing | Legal floor for web |
| WCAG 2.2 SC 2.5.5 (AAA) | 44 × 44 CSS px | Aspirational |
| Apple HIG | 44 × 44 pt | Platform convention (iOS/iPadOS); visionOS recommends ~60 pt because gaze+pinch is less precise |
| Material Design | 48 × 48 dp (~9 mm physical) | Platform convention |
| Automotive (Google Design for Driving) | ~76 dp | Context raises the bar |
Practical rule: design to 44–48 px minimum for anything touchable; treat WCAG's 24 px as
a floor you never actually approach. The visual element can be smaller than the hit
target — pad it. min-height: 44px with the icon at 24 px inside is the standard fix.
Spacing matters as much as size: adjacent targets need ≥8 px of gap; destructive actions need ≥16 px of separation from anything else.
[DURABLE, with caveats] One-handed phone use concentrates comfortable reach in the lower-center of the screen; top corners (especially the opposite top corner from the holding hand) are hardest. Consequences:
[DURABLE] Gestures are invisible, unlabeled, and unmemorable. Every gesture needs:
Reserve system gestures: edge swipes (back/home/control center), pull-to-refresh at scroll top, pinch-zoom. Overloading these produces conflicts users experience as "the app is broken."
[DURABLE] Full keyboard operability is simultaneously an accessibility requirement (WCAG 2.1.1, Level A) and the single biggest efficiency win for expert users. They are the same feature.
tabindex above 0 is almost always a bug.:focus outlines without a replacement is a Level A failure.
Use :focus-visible to satisfy both the mouse aesthetes and the keyboard users.Every interactive element needs a designed default, hover, focus, active, disabled, loading, error, and selected state. Missing states are where interfaces feel cheap.
On disabled buttons [CONTESTED]: the classic guidance is to disable a submit button
until the form is valid. The counter-position — now the majority view among accessibility
practitioners — is that disabled buttons are invisible to some assistive tech, give no
explanation, and leave the user stuck with no feedback about why. Preferred pattern:
keep the button enabled, and on click, validate, focus the first error, and announce it.
Reserve disabled for states that are genuinely unavailable for reasons the user already
understands.
ui-ux-cognition-heuristics-and-navigation). Arbitrary spacing is the visual signature of an unsystematized product.Responsive = one fluid layout that reflows continuously. Adaptive = discrete layouts swapped at breakpoints. In 2026 the practical answer is layered:
| Tool | Job |
|---|---|
| Media queries | Page-level structure (sidebar vs. stacked) |
| Container queries | Component-level adaptation — a card responds to its own available space, not the viewport. Baseline Widely Available since August 2025 (~93% support). This is the biggest shift in responsive layout since media queries. |
clamp() fluid type/space | Smooth scaling instead of jumps at breakpoints |
Intrinsic layouts (grid-template-columns: repeat(auto-fit, minmax(…, 1fr)), Flexbox wrap) | Breakpoint-free layouts that just work |
dvh/svh/lvh | The mobile-100vh problem (svh is safer where mid-scroll reflow is unacceptable) |
prefers-reduced-motion, prefers-color-scheme, prefers-contrast | Respecting user settings |
/* Container query: the component adapts to its context, not the window */
.card-wrap { container-type: inline-size; }
@container (min-width: 400px) {
.card { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; }
}
/* Fluid type. ⚠️ The max must not exceed ~2.5× the min, and the formula MUST
include a rem component — a pure-vw font size fails WCAG SC 1.4.4 (Resize Text)
because it doesn't respond to browser zoom. */
:root {
--step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
--step-3: clamp(1.75rem, 1.4rem + 1.75vw, 3rem);
}
[DURABLE] Breakpoints come from your content, not from a device list. Resize the browser slowly and put a breakpoint where the layout breaks — where the measure gets too long, the columns get too narrow, the nav wraps. A breakpoint at 768 "because iPad" is a coincidence, and the device it named has been irrelevant for years.
Useful starting ranges (then adjust to content): ~360–480 (phone portrait), ~481–767 (phone landscape / small), ~768–1023 (tablet), ~1024–1279 (small laptop), 1280+ (desktop). Note the 768–1024 band is genuinely awkward: a single text column at 840 px exceeds the optimal measure, but a phone layout wastes the space. Two-column, or one column with generous side padding, is usually right.
[DURABLE] A tablet is not a big phone and not a small laptop. The common failure is shipping a stretched phone layout: a 1024 px-wide single column of full-width list rows with a 900 px measure. The tablet-specific moves:
Foldables introduce: square-ish aspect ratios, ultra-wide unfolded states, a hinge/fold that content must not straddle, and continuity — an app that must survive a fold/unfold transition mid-task without losing state. Practical guidance: use adaptive layout driven by available size (not device identity), handle configuration changes without recreating state, avoid placing interactive elements across the fold, and test the fold transition explicitly. Container queries handle much of this without device detection.
Provide density options in data-heavy desktop and web apps (comfortable / compact). Users of professional tools genuinely want more rows per screen; consumer users don't. This is one of the few places where a preference toggle beats a designer's judgment.
[DURABLE] Typography is 90% of most interfaces, and hierarchy is 90% of typography.
system-ui stack) load instantly,
render optimally, and support the full glyph range. Custom fonts cost LCP; subset them,
preload the critical weight, and use font-display: swap (or optional) — an unstyled
or invisible text flash is a CLS and a perceived-performance problem.blue-500; let it reference
color.action.primary, which resolves to blue-500 in light mode and blue-300 in
dark. Without this layer, dark mode and theming are a rewrite (§7.2 → ui-ux-design-systems-platforms-and-accessibility).ui-ux-design-systems-platforms-and-accessibility for the standards fight): WCAG 2.2 requires 4.5:1 for body
text, 3:1 for large text (≥18 pt / 14 pt bold) and for UI components and graphical
objects (SC 1.4.11).z.modal: 1000), or you will end up with z-index: 99999.aria-hidden="true", alt="").[DURABLE] Motion's job is to explain, not to decorate. Legitimate uses:
Timing: UI transitions 150–300 ms; enter slightly slower than exit; larger objects slower than small ones. Easing: ease-out for entering (fast then settle), ease-in for exiting. Linear easing looks mechanical and is almost always wrong. Spring/physics-based motion (now first-class in Material 3 Expressive and SwiftUI) feels more natural for direct-manipulation gestures because it preserves velocity continuity.
prefers-reduced-motion is not optional. Vestibular disorders make large parallax,
zoom, and slide animations genuinely nauseating. Honour the setting by replacing motion
with a cross-fade or an instant change — not by removing the feedback entirely.
| Wait | Design response |
|---|---|
| < 100 ms | Feels instant. Do nothing. |
| 100 ms – 1 s | Users notice but stay in flow. Subtle state change. |
| 1 – 10 s | Show progress. Skeleton screens > spinners (they signal structure). Determinate > indeterminate. |
| > 10 s | Progress + estimate + cancel + ability to leave and be notified. |
Optimistic UI (apply the change immediately, reconcile with the server later) is the single most effective perceived-performance technique — and the most commonly botched. The rule: if you show success optimistically, you owe the user an honest, non-destructive recovery when it fails. Silently reverting is worse than having waited.
Core Web Vitals are the closest thing the web has to a shared performance contract, and they are field metrics (real Chrome users, 75th percentile, 28-day window) — not lab scores:
| Metric | "Good" threshold | What it measures |
|---|---|---|
| LCP | ≤ 2.5 s | Loading — when the largest visible element paints |
| INP | ≤ 200 ms | Responsiveness — full interaction lifecycle (replaced FID in March 2024) |
| CLS | ≤ 0.1 | Visual stability — unexpected layout shift |
INP is the one most sites fail (roughly 43% miss the 200 ms threshold), because fixing
it requires JavaScript architecture changes — yielding to the main thread, breaking up long
tasks — not just compressing an image. CLS is the most design-caused: always set
explicit width/height (or aspect-ratio) on images, videos, iframes, and ad slots, and
reserve space for anything that loads late.
What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/ui-ux-cognition-heuristics-and-navigationUse when reasoning about why an interface works or fails, or structuring one. Covers the four form factors honestly compared (the router for the whole ui-ux-design-principles reference), motor control (Fitts's law), decision and attention (Hick's law), perception and grouping (Gestalt), memory of the experience (peak-end), learning and expertise, Nielsen's 10 heuristics with their failure modes, Norman's model (affordances, signifiers, the gulfs), confirmation vs undo, progressive disclosure and defaults, the IA questions in order, navigation patterns by form factor, search, and wayfinding./ui-ux-design-systems-platforms-and-accessibilityUse when building or governing a design system, matching platform conventions, or meeting accessibility requirements. Covers what a design system actually is, the three-tier token architecture, component API design, measuring adoption; Apple HIG and Liquid Glass, Material 3 and M3 Expressive, web conventions, desktop (macOS, Windows, GNOME, KDE), consistency vs nativeness; and accessibility — the standards and the law in 2026 (WCAG 2.2/3.0, EN 301 549, the European Accessibility Act, ADA Title II), contrast and the APCA question, the practical checklist, and testing.Other plugins' skills for the same job
npx claudepluginhub the-vibey-project/vibey --plugin ui-ux-design-principles