home / skills / ratacat / claude-skills / web-interface-design

web-interface-design skill

/skills/web-interface-design

This skill helps you design and review web interfaces by applying typography, forms, buttons, color systems, and layout guidelines for clarity.

npx playbooks add skill ratacat/claude-skills --skill web-interface-design

Review the files below or copy the command above to add this skill to your agents.

Files (10)
SKILL.md
3.9 KB
---
name: web-interface-design
description: Use when designing or reviewing web UI, implementing forms/buttons/inputs, fixing visual hierarchy issues, creating color systems, building layouts, or when interface feels cluttered, hard to read, or users don't know what to click.
---

# Web Interface Design

## Overview

Design exists to **separate the primary from the secondary**. Users should instantly recognize what matters. Good interface design is invisible—users accomplish goals without noticing the interface.

This skill orchestrates domain-specific reference files. Read only what you need for the task.

## Reference File Index

| Task | Load Reference |
|------|----------------|
| Font sizes, line spacing, heading hierarchy, vertical rhythm | `references/typography.md` |
| Input fields, validation, checkboxes, radios, selects, textareas | `references/forms-and-inputs.md` |
| Button hierarchy, sizing, states, CTAs, ghost buttons | `references/buttons.md` |
| Color palettes, dark mode, tints/shades, state colors | `references/color-systems.md` |
| Navigation, cards, tabs, accordions, modals, tables, toasts | `references/ui-components.md` |
| Grids, spacing scales, responsive patterns, whitespace | `references/layout-and-spacing.md` |
| Focus techniques, hierarchy principles, action pyramid | `references/visual-hierarchy.md` |
| Contrast ratios, focus states, screen readers, WCAG | `references/accessibility.md` |
| CSS implementation patterns, variables, common styles | `references/css-patterns.md` |

## Quick Decision: Which Reference?

```
What's the problem?
├─ Text hard to read, spacing feels off → typography.md
├─ Form not working well, validation issues → forms-and-inputs.md
├─ Users don't know what to click → buttons.md OR visual-hierarchy.md
├─ Colors look wrong, dark mode broken → color-systems.md
├─ Need nav/cards/tabs/modals/tables → ui-components.md
├─ Spacing inconsistent, layout cramped → layout-and-spacing.md
├─ Everything competes for attention → visual-hierarchy.md
├─ Accessibility audit or contrast issues → accessibility.md
└─ Need CSS implementation → css-patterns.md
```

## Universal Quick Reference

### Spacing Scale (4px base)
`4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96`

### Typography Baseline
- Body: 16px, line-height 1.5
- Heading:body ratio max 1:3 (48px heading for 16px body)
- Paragraph spacing: line-height ÷ 1.5

### Touch Targets
- Minimum: 44×44px
- Recommended: 48×48px

### Contrast Minimums (WCAG)
- Normal text: 4.5:1
- Large text (18px+ or 14px+ bold): 3:1
- UI components: 3:1

### Button Hierarchy
| Level | Use For | Treatment |
|-------|---------|-----------|
| Primary | Main action (ONE per view) | Solid fill, high contrast |
| Secondary | Alternative actions | Outlined or subtle fill |
| Tertiary | Minor actions | Text-only or ghost |

### Dark Mode Essentials
- Background: #121212 (not pure black)
- Text: #E0E0E0 (not pure white)
- Reduce color saturation

## Common Mistakes Checklist

- [ ] Multiple primary buttons per view
- [ ] Placeholder used as only label
- [ ] Pure white on pure black
- [ ] Thin/light font weights
- [ ] Color-only error indicators
- [ ] Long centered text
- [ ] Inconsistent spacing values

## Design Review Protocol

1. **Hierarchy**: Is primary action obvious? Can you tell what matters?
2. **Readability**: Text contrast OK? Line length reasonable (45-75 chars)?
3. **Forms**: Labels above fields? Touch targets 44px+? Helpful errors?
4. **Spacing**: Consistent scale? Breathing room around elements?
5. **Accessibility**: Color not sole indicator? Focus states visible?

## When NOT to Use This Skill

- Pure visual branding/identity work
- Marketing copy decisions
- Backend architecture
- Mobile native patterns (iOS/Android differ)

## Sources

- **Web Interface Handbook** by Aleksei Baranov (Imperavi)
- **User Interface Typography** by Imperavi
- **Refactoring UI** by Wathan & Schoger
- WCAG 2.1 accessibility guidelines

Overview

This skill helps design and review web interfaces to make them clearer, more usable, and visually balanced. It focuses on hierarchy, readability, form behavior, color systems, layout, and accessibility so users can complete goals without friction. Use it to diagnose problems, suggest fixes, and produce practical implementation guidance.

How this skill works

The skill inspects interface issues and maps each problem to a concise set of reference patterns: typography, spacing, forms, buttons, color systems, UI components, layout, visual hierarchy, and accessibility. For a given task it reads only the relevant guidance and returns targeted recommendations, checks, and concrete measures (sizes, contrast ratios, spacing scale, touch targets). It also provides a short review protocol to validate changes.

When to use it

  • Designing or reviewing web UI to improve clarity and task flow
  • Implementing or fixing forms, inputs, validation, or error states
  • Resolving visual hierarchy problems so users know what to click
  • Creating color systems, dark mode, or fixing contrast issues
  • Building responsive layouts, spacing scales, and consistent grids

Best practices

  • Establish a single primary action per view and style it for high contrast
  • Use a consistent spacing scale (4px base) and stick to rhythm for vertical spacing
  • Keep body text at ~16px with 1.5 line-height and headings scaled by a maximum 3:1 ratio
  • Place labels above fields, ensure touch targets ≥44×44px, and show clear error states beyond color
  • Follow WCAG contrast minimums (4.5:1 normal text, 3:1 large text) and include visible focus states

Example use cases

  • Audit a page where users miss the main CTA and propose a new button hierarchy and visual emphasis
  • Redesign a complex form with validation, accessible labels, and improved field spacing
  • Create a color palette and dark mode adjustments that maintain contrast and reduce saturation
  • Refactor a cramped dashboard into a consistent grid using the spacing scale and rhythm
  • Fix accessibility issues: low contrast, missing focus outlines, or color-only status indicators

FAQ

What quick checks should I run first?

Start with hierarchy (is primary action obvious?), readability (contrast and line length), and forms (labels, touch targets, helpful errors).

When should I prioritize spacing vs. color changes?

If elements compete for attention or feel crowded, fix spacing and hierarchy first; if readability or status signals fail, address colors and contrast immediately.