ui-design-fundamentals
Skill129 starsChanged 9 months agoMITView on GitHub
Reference guide for designing effective, accessible user interfaces. Core principle: Less is more - every element should serve a purpose. Detailed guidance by topic:
In this repository21 other files it gives its agents.
- .claude/skills/bulletproof-frontend/CLAUDE.mdCLAUDE.md
- adapting-claude-pipelineSkill
- brainstormingSkill
- bulletproof-frontendSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- handle-issuesSkill
- implement-issueSkill
- improvement-loopSkill
- investigating-codebase-for-user-storiesSkill
- process-prSkill
- review-uiSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-skillsSkill
- write-docblocksSkill
- writing-agentsSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
All spacing, margins, and dimensions use multiples of 8px.
- Distinctive: line 26
Never rely on color alone
- Distinctive: line 104
Mobile first: - Start with smallest screen
- Distinctive: line 106
Test contrast: - Verify accessibility
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---name: ui-design-fundamentals description: Use when designing UI components, reviewing frontend code, choosing colors, spacing, typography, or layout. Use when CSS looks off, components feel unbalanced, or accessibility is unclear.
UI Design Fundamentals
Overview
Reference guide for designing effective, accessible user interfaces. Core principle: Less is more - every element should serve a purpose.
Core Principles
1. The 8-Point Grid
All spacing, margins, and dimensions use multiples of 8px. Use 4px for fine control.
2. Visual Hierarchy
Guide attention through size, weight, color, and spacing. Most important = largest/boldest.
3. Consistency
Same patterns throughout. Create style guide first, then components.
4. Accessibility First
- Minimum 4.5:1 contrast for text
- 44px minimum tap targets (48px preferred)
- Never rely on color alone
5. Mobile First
Design smallest screen first. Easier to scale up than down.
6. Grayscale First
Focus on layout and hierarchy before adding color.
Quick Reference Tables
Spacing Scale (8pt grid)
| Value | Use |
| 8px | Tight gaps, icons |
| 16px | Standard padding |
| 24px | Related groups |
| 32px | Card padding |
| 48px | Section gaps |
| 64-96px | Major sections |
Contrast Requirements (WCAG)
| Element | Minimum |
| Small text | 4.5:1 |
| Large text (>24px) | 3:1 |
| UI components | 3:1 |
| AAA (ideal) | 7:1 |
Tap Targets
| Platform | Minimum |
| iOS | 44x44px |
| Android | 48x48px |
| Desktop | 32-40px height |
Frame Sizes
| Platform | Size |
| iOS | 375x812 |
| Android | 360x800 |
| Desktop | 1440x1024 |
| Large desktop | 1920x1024 |
Reference Files
Detailed guidance by topic:
| File | Topics |
| grid-and-spacing.md | 8pt grid, layouts, margins, gutters, box model, alignment |
| typography.md | Type scales, font weights, line heights, hierarchy |
| colors.md | Color theory, WCAG contrast, psychology, tints/shades, dark mode |
| shadows-and-depth.md | Elevation, shadow techniques, gradients |
| buttons.md | Anatomy, states, hierarchy, icons, placement |
| forms.md | Labels, validation, input types, multi-step, accessibility |
| navigation.md | Nav bars, sticky headers, mobile tab bars, breadcrumbs |
| hero-sections.md | Above the fold, CTAs, social proof, F/Z patterns |
| cards.md | Anatomy, spacing, types, consistency |
| modals-and-dropdowns.md | Modal windows, dialogs, dropdown patterns |
| search.md | Search inputs, autocomplete, recent searches, no-results |
| pricing.md | Pricing sections, psychology, conversion optimization |
| style-guides.md | Component libraries, design systems, documentation |
Common Mistakes
| Mistake | Fix |
| Random spacing | Use 8px grid |
| Low contrast | Min 4.5:1, use A11y plugin |
| Tiny tap targets | 44px minimum |
| Too many elements | Remove until it breaks |
| Inconsistent styles | Style guide first |
| Pure black/white | Tint with primary color |
Design Process
- Research - User flows, personas, inspiration
- Grayscale wireframe - Layout and hierarchy only
- Mobile first - Start with smallest screen
- Add color - Apply palette after structure is solid
- Test contrast - Verify accessibility
- Iterate - Refine based on feedback
Related Skills
- bulletproof-frontend — CSS implementation: architecture patterns, BEM naming, accessibility code, responsive CSS, Blade components, Tailwind refactoring
Resources
- iOS: Human Interface Guidelines (developer.apple.com)
- Android/Web: Material Design 3 (m3.material.io)
- Inspiration: mobbin.com, land-book.com, refero.design
- Plugins: A11y Contrast Checker, Beautiful Shadows
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

