O
Octo
O
Octo
CoursesPricingDashboardPrivacyTerms

© 2026 Octo

UX/UI Design
1The UX Design Process2User Research Methods3Information Architecture4Wireframing5Prototyping & Interaction Design6Usability Testing7UI Design Principles8Building Your UX Portfolio
Module 7

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.

92%global search market share

1primary action on the page

28elements on Google's 1998 homepage

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:

ToolHow it worksExample
SizeBigger = more importantA 48px heading grabs attention before 14px body text
Color and contrastHigh contrast = more attentionA bright blue button on a white background stands out
PositionTop-left (in LTR languages) gets seen firstThe most important content goes in the top-left quadrant
SpacingMore whitespace around an element = more prominenceApple gives its products enormous breathing room
WeightBolder = more importantBold headings pull the eye before regular body text

RoughDiagram: invalid JSON

🔑The squint test
Squint at your screen until the text is blurry. Can you still tell what the most important element is? If yes, your visual hierarchy is working. If everything looks the same, you have a hierarchy problem. Professional designers use this trick constantly — it strips away content and reveals pure visual structure.

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.

RoleSizeWeightUse case
Display48-64pxBoldHero headings, marketing pages
H132-40pxBoldPage titles
H224-28pxSemiboldSection headings
H320-22pxSemiboldSubsection headings
Body16pxRegularParagraphs, descriptions
Small14pxRegularCaptions, labels, metadata
Tiny12pxRegularLegal 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 rolePurposeExample
PrimaryBrand identity, primary actionsBlue "Sign Up" button, accent links
SecondarySupporting actions, less emphasisGray "Cancel" button, secondary navigation
SuccessPositive feedback, completionGreen checkmark, "Payment successful"
WarningCaution, attention neededYellow/amber "Your trial expires in 3 days"
ErrorProblems, validation failuresRed "Invalid email address"
NeutralBackgrounds, borders, body textGrays 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 XP
Open 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._

Spacing — 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 valueUse case
4pxTight — between an icon and its label
8pxCompact — between related elements within a group
16pxStandard — between form fields, list items
24pxSection padding — inside cards, modals
32pxBetween sections on a page
48-64pxBetween major page sections
⚠️Spacing communicates relationships
Gestalt's Law of Proximity says that elements close together are perceived as related. If you put equal spacing between a heading and its body text and between that body text and the next section, users cannot tell where one section ends and another begins. The fix: tight spacing within a group, generous spacing between groups.

Gestalt principles — how humans see patterns

Gestalt psychology explains how the human brain organizes visual information. These principles are the foundation of layout design.

PrincipleRuleUI application
ProximityThings near each other are perceived as relatedGroup related form fields together; separate sections with space
SimilarityThings that look alike are perceived as relatedAll clickable links are the same blue; all disabled buttons are the same gray
ClosureThe brain completes incomplete shapesA partially visible card at the edge of a carousel signals "swipe for more"
ContinuityThe eye follows smooth pathsHorizontal navigation bars, progress steppers, timelines
Figure-groundThe brain separates foreground from backgroundA modal (figure) on a dimmed page (ground)
Common regionElements within a border are perceived as a groupCards, 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

16%of world population has a disability

1B+people affected by visual impairments

8%of men have color vision deficiency

WCAG — the accessibility standard

The Web Content Accessibility Guidelines (WCAG) are the global standard. The most important rules for UI designers:

RuleWhat it meansHow to check
Color contrast 4.5:1Text 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 aloneNever use only color to convey meaning — add icons, text, or patternsWould a colorblind user understand this?
Touch targets 44x44pxInteractive elements must be at least 44x44 pixels (or points) on mobileMeasure in Figma
Keyboard navigationEvery interactive element must be reachable and operable via keyboardTab through your entire interface
Alt textEvery meaningful image needs descriptive alternative textWould a screen reader user understand the image's purpose?

⚡

Accessibility Audit

50 XP
Pick 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._

Design 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 systemCompanyNotable contribution
Material DesignGoogleDefined "material" as a visual metaphor: surfaces, depth, motion
Human Interface GuidelinesAppleEstablished iOS conventions: tab bars, swipe gestures, SF Symbols
CarbonIBMEnterprise-grade system for complex data products
PolarisShopifyE-commerce-specific patterns for merchant dashboards
Atlassian Design SystemAtlassianScaled 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
🔑Google created Material Design because they had to
By 2014, Google had dozens of products (Gmail, Maps, Drive, Calendar, YouTube) and each looked and behaved differently. A user who learned Gmail's interface had to re-learn everything for Google Drive. Material Design was not a creative exercise — it was a necessity. One design system unified the experience across every Google product, saving millions of engineering hours and giving billions of users a consistent experience.

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?

Previous

Usability Testing

Next

Building Your UX Portfolio