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.
What you will build in this module
By the end, you will be able to audit any product's color palette against the 60-30-10 rule, run a 5-point accessibility check on any website, and classify Gestalt principles in real interfaces. Usability testing (Module 6) confirmed that your layout works and users can complete tasks. Now it is time to make it look and feel professional.
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.
✗ Color misuse
- ✗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
✓ Color done right
- ✓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 XPOpen any app or website you use frequently. Identify: 1. **Primary color** — What is the main accent color? Where is it used? 2. **60-30-10 ratio** — What percentage of the screen is background vs. secondary vs. accent? 3. **Functional colors** — How does the product communicate success, warning, and error? Are the colors consistent? 4. **Contrast** — Is the body text easy to read? (Hint: if you squint and can still read it, contrast is probably fine.) 5. **One issue** — Find one place where color is used inconsistently or where contrast seems too low. _Hint: Check the login page, the settings page, and a form with validation errors. These three screens reveal how consistently a product uses its color system._
Sign in to earn 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 XPPick any website or app. Run this quick audit: 1. **Contrast**: Is all body text readable? Use the squint test or WebAIM Contrast Checker. 2. **Color reliance**: Find a place where color conveys meaning (form validation, status badges, chart legends). Is there a non-color indicator too? 3. **Touch targets**: On your phone, is every button and link easy to tap without accidentally hitting something else? 4. **Keyboard**: On desktop, press Tab repeatedly. Can you navigate the entire page? Can you tell which element is focused? 5. **Score**: Rate the site 1-5 on accessibility. What is the single biggest issue? _Hint: Form validation is the most common accessibility failure. Many sites show errors only in red text with no icon, label, or border change — invisible to colorblind users and unreadable for screen readers._
Sign in to earn 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
Classify the Gestalt Principle
25 XPFor each UI example, identify which Gestalt principle is at work. **Categories:** Proximity, Similarity, Closure, Continuity, Figure-ground, Common region 1. A modal dialog appears over a dimmed background, clearly separating the form from the page behind it. {"\u2192"} ___ 2. A horizontal progress stepper shows steps 1 through 5 connected by a line — your eye follows the path from left to right. {"\u2192"} ___ 3. A form groups "Billing Address" fields together with 8px spacing between them, then uses 32px spacing before the "Shipping Address" fields. {"\u2192"} ___ 4. A carousel shows two full cards and the edge of a third card peeking in from the right — you know there are more cards to scroll to. {"\u2192"} ___ 5. All clickable links on a page are the same shade of blue, while all disabled elements are the same shade of gray. {"\u2192"} ___ 6. A settings page groups related toggles inside bordered sections labeled "Notifications," "Privacy," and "Account." {"\u2192"} ___ _Hint: Proximity is about distance between elements. Similarity is about shared visual properties. Closure is about the brain completing shapes. Continuity is about following lines. Figure-ground is about foreground vs. background. Common region is about shared borders._
Sign in to earn XPRemember Google's nearly empty homepage? In the late 1990s, the conventional wisdom was that a homepage should show users everything available — the more links, the more valuable the page. Google proved the opposite. By giving the search box enormous whitespace, a single primary action, and zero visual distractions, they demonstrated every principle you learned in this module: hierarchy (the search box dominates), typography (minimal, clear), color (white background, two simple buttons), spacing (maximum breathing room), and Gestalt (figure-ground — the search box is the only figure). Twenty-five years later, the homepage still looks almost exactly the same.
You now have the full UX toolkit — from research and wireframing to prototyping, testing, and visual polish. In the final module, you will learn how to package everything you have built into a portfolio that gets you hired.
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?