ui-design-fundamentals
Reference of UI fundamentals (8-point grid, colour, typography, buttons, cards, forms, navigation, modals, hero sections, pricing, search, shadows) used by define-design to fill DESIGN.md and by harden to judge design conformance. Adapted from aaddrick/claude-pipeline (MIT).
- License 许可
- MIT
- 最近更新
- 2026-10-07
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ui-design-fundamentals
- description
- Reference of UI fundamentals (8-point grid, colour, typography, buttons, cards, forms, navigation, modals, hero sections, pricing, search, shadows) used by define-design to fill DESIGN.md and by harden to judge design conformance. Adapted from aaddrick/claude-pipeline (MIT).
- disable-model-invocation
- true
02 资源文件 13
- 参考文档buttons.md6.5 KB
- 参考文档cards.md12.2 KB
- 参考文档colors.md5.3 KB
- 参考文档forms.md10.2 KB
- 参考文档grid-and-spacing.md5.6 KB
- 参考文档hero-sections.md9.3 KB
- 参考文档modals-and-dropdowns.md11.7 KB
- 参考文档navigation.md8.5 KB
- 参考文档pricing.md10.2 KB
- 参考文档search.md11.6 KB
- 参考文档shadows-and-depth.md6.5 KB
- 参考文档style-guides.md8.7 KB
- 参考文档typography.md4.8 KB
03 SKILL.md 正文
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
04 同仓库更多 Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment [Superpowers; user-invoked. Use to write or pressure-test a skill, e.g. product-studio changes.]
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code [product-studio: canonical Code-tab execution, entered via build-ticket; user-invoked otherwise]
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
wizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs. [Python alternative to playwright-skill (canonical for scripted browser checks); user-invoked only.]
web-design-guidelines
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".