UI Design Principles
UX decides what goes on the screen. UI decides how it looks and feels. Here's the visual design fundamentals — hierarchy, typography, color, spacing, Gestalt, accessibility, and design systems.
Why Google's homepage won
In the late 1990s, Yahoo, AltaVista, and Lycos dominated search. Their homepages were packed — links, ads, news, stock tickers, weather, horoscopes, chat rooms. They looked like the front page of a newspaper having a panic attack.
Then Google arrived with a nearly empty white page, a logo, a search box, and two buttons. That was it.
Users loved it. Not because it was "clean" or "minimalist" as design buzzwords. They loved it because it told them exactly what to do. There was only one action available: type what you are looking for. No decisions to make. No visual noise competing for attention.
Google's homepage was not just good design — it was a masterclass in visual hierarchy, the single most important principle in UI design. Every element on the page served one purpose: directing your eyes and your cursor to the search box.
Visual hierarchy — the foundation of UI design
Visual hierarchy is the arrangement of elements so that users see the most important thing first, the second most important thing second, and so on. It guides the eye through the page in the order you intend.
You control hierarchy with five tools:
| Tool | How it works | Example |
|---|---|---|
| Size | Bigger = more important | A 48px heading grabs attention before 14px body text |
| Color and contrast | High contrast = more attention | A bright blue button on a white background stands out |
| Position | Top-left (in LTR languages) gets seen first | The most important content goes in the top-left quadrant |
| Spacing | More whitespace around an element = more prominence | Apple gives its products enormous breathing room |
| Weight | Bolder = more important | Bold headings pull the eye before regular body text |
Typography — 95% of design is type
Oliver Reichenstein of iA famously said that 95% of the information on the web is written language. If that is true, then 95% of web design is typography.
Type scale — the sizes that work
A type scale is a set of predefined font sizes used throughout your product. Instead of picking random sizes (13px here, 17px there, 22px somewhere else), you use a mathematical scale.
| Role | Size | Weight | Use case |
|---|---|---|---|
| Display | 48-64px | Bold | Hero headings, marketing pages |
| H1 | 32-40px | Bold | Page titles |
| H2 | 24-28px | Semibold | Section headings |
| H3 | 20-22px | Semibold | Subsection headings |
| Body | 16px | Regular | Paragraphs, descriptions |
| Small | 14px | Regular | Captions, labels, metadata |
| Tiny | 12px | Regular | Legal text, timestamps |
Font pairing rules
- Two fonts maximum. One for headings, one for body. More than two creates visual chaos.
- Contrast pairing. A serif heading (Georgia, Playfair Display) with a sans-serif body (Inter, Open Sans) creates natural hierarchy.
- Safe defaults. If in doubt: Inter for everything. It was designed specifically for screens and works at every size.
There Are No Dumb Questions
"Why 16px for body text? That seems big."
Because users read on screens at arm's length, not book distance. Print designers used 10-12pt for body copy because books are held 12 inches from your face. Screens are 20-30 inches away. Below 16px, most users unconsciously squint or lean forward. Google, Apple, and most major platforms use 16px as the minimum for body text. It is also the default browser font size, which means your design works with user-configured text scaling.
Color theory — communicate, do not decorate
Color in UI design is not about aesthetics — it is about communication. Every color choice should serve a purpose.
The functional color system
| Color role | Purpose | Example |
|---|---|---|
| Primary | Brand identity, primary actions | Blue "Sign Up" button, accent links |
| Secondary | Supporting actions, less emphasis | Gray "Cancel" button, secondary navigation |
| Success | Positive feedback, completion | Green checkmark, "Payment successful" |
| Warning | Caution, attention needed | Yellow/amber "Your trial expires in 3 days" |
| Error | Problems, validation failures | Red "Invalid email address" |
| Neutral | Backgrounds, borders, body text | Grays from #F5F5F5 (lightest) to #1A1A1A (darkest) |
The 60-30-10 rule
- 60% dominant color (usually your background — white or light gray)
- 30% secondary color (cards, sections, supporting elements)
- 10% accent color (CTAs, links, icons — your primary brand color)
This ratio ensures visual calm. A page that is 60% bright blue would be overwhelming. A page that is 60% white with 10% blue accents for buttons and links feels clean and intentional.
✗ Without AI
- ✗5 different accent colors competing for attention
- ✗Red used for both errors and sale badges
- ✗Low contrast text (light gray on white)
- ✗Color is the only way to convey information
✓ With AI
- ✓One primary accent color, used consistently
- ✓Red reserved for errors; green for success
- ✓High contrast text (dark gray on white, 4.5:1 ratio)
- ✓Color reinforced by icons, text, and position
Audit a Color Palette
25 XPSpacing — the invisible design element
Whitespace (also called negative space) is not empty space — it is a design element. It separates groups, creates hierarchy, and gives the eye room to rest.
The 8px grid system
Most design systems use an 8px grid: all spacing values are multiples of 8. This creates consistent, harmonious rhythm throughout the interface.
| Spacing value | Use case |
|---|---|
| 4px | Tight — between an icon and its label |
| 8px | Compact — between related elements within a group |
| 16px | Standard — between form fields, list items |
| 24px | Section padding — inside cards, modals |
| 32px | Between sections on a page |
| 48-64px | Between major page sections |
Gestalt principles — how humans see patterns
Gestalt psychology explains how the human brain organizes visual information. These principles are the foundation of layout design.
| Principle | Rule | UI application |
|---|---|---|
| Proximity | Things near each other are perceived as related | Group related form fields together; separate sections with space |
| Similarity | Things that look alike are perceived as related | All clickable links are the same blue; all disabled buttons are the same gray |
| Closure | The brain completes incomplete shapes | A partially visible card at the edge of a carousel signals "swipe for more" |
| Continuity | The eye follows smooth paths | Horizontal navigation bars, progress steppers, timelines |
| Figure-ground | The brain separates foreground from background | A modal (figure) on a dimmed page (ground) |
| Common region | Elements within a border are perceived as a group | Cards, form sections, navigation menus |
There Are No Dumb Questions
"Are Gestalt principles a real science thing or a design thing?"
Real science. Gestalt psychology was developed by German psychologists in the 1920s (Wertheimer, Koffka, Kohler) to explain how humans perceive visual stimuli. UI designers adopted these principles because they describe how every human brain processes visual information — not just designers' brains. When you group related form fields together (proximity) or dim the background behind a modal (figure-ground), you are leveraging 100 years of perceptual psychology.
Accessibility — designing for everyone
Accessible design is not charity — it is good design. When you design for users with disabilities, you improve the experience for everyone.
The numbers
WCAG — the accessibility standard
The Web Content Accessibility Guidelines (WCAG) are the global standard. The most important rules for UI designers:
| Rule | What it means | How to check |
|---|---|---|
| Color contrast 4.5:1 | Text must have a 4.5:1 contrast ratio against its background (3:1 for large text) | Use WebAIM Contrast Checker |
| Do not rely on color alone | Never use only color to convey meaning — add icons, text, or patterns | Would a colorblind user understand this? |
| Touch targets 44x44px | Interactive elements must be at least 44x44 pixels (or points) on mobile | Measure in Figma |
| Keyboard navigation | Every interactive element must be reachable and operable via keyboard | Tab through your entire interface |
| Alt text | Every meaningful image needs descriptive alternative text | Would a screen reader user understand the image's purpose? |
Accessibility Audit
50 XPDesign systems — scaling design across products
A design system is a collection of reusable components, patterns, and guidelines that ensure visual and functional consistency across an entire product (or portfolio of products).
| Design system | Company | Notable contribution |
|---|---|---|
| Material Design | Defined "material" as a visual metaphor: surfaces, depth, motion | |
| Human Interface Guidelines | Apple | Established iOS conventions: tab bars, swipe gestures, SF Symbols |
| Carbon | IBM | Enterprise-grade system for complex data products |
| Polaris | Shopify | E-commerce-specific patterns for merchant dashboards |
| Atlassian Design System | Atlassian | Scaled across Jira, Confluence, Trello — 10+ products |
A design system typically includes:
- Tokens: The atomic values — colors, spacing, typography, border radius, shadows
- Components: Buttons, inputs, cards, modals, tables, navigation — all reusable
- Patterns: How components combine for common tasks (form layout, data table filtering, error handling)
- Guidelines: When to use which component, accessibility rules, tone of voice
Key takeaways
- Visual hierarchy guides the eye through the page using size, color, position, spacing, and weight — squint test it
- Typography is 95% of web design — use a type scale, limit to 2 fonts, never go below 16px for body text
- Color is communication — use the 60-30-10 ratio; reserve red for errors, green for success; never rely on color alone
- Spacing on an 8px grid creates consistent rhythm — use proximity to show relationships, whitespace to separate groups
- Gestalt principles (proximity, similarity, closure, continuity, figure-ground, common region) explain how humans perceive visual groupings
- Accessibility is not optional — WCAG 4.5:1 contrast, 44x44px touch targets, keyboard navigation, alt text, no color-only information
- Design systems (Material Design, HIG, Polaris) scale visual consistency across products and teams
Knowledge Check
1.What is visual hierarchy in UI design?
2.According to WCAG, what is the minimum contrast ratio for normal body text?
3.What does Gestalt's Law of Proximity state?
4.What problem did Google's Material Design solve?