dev-booster 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +203 -0
- package/bin/dev-booster.js +4 -0
- package/package.json +41 -0
- package/src/index.js +78 -0
- package/src/sync-template.js +55 -0
- package/template/.devbooster/MANIFEST.md +177 -0
- package/template/.devbooster/boosters/accessibility.md +63 -0
- package/template/.devbooster/boosters/advisor.md +68 -0
- package/template/.devbooster/boosters/atomic.md +58 -0
- package/template/.devbooster/boosters/backend.md +75 -0
- package/template/.devbooster/boosters/changelog.md +126 -0
- package/template/.devbooster/boosters/create.md +85 -0
- package/template/.devbooster/boosters/debug.md +55 -0
- package/template/.devbooster/boosters/deploy.md +11 -0
- package/template/.devbooster/boosters/design.md +56 -0
- package/template/.devbooster/boosters/discovery.md +75 -0
- package/template/.devbooster/boosters/documentation.md +106 -0
- package/template/.devbooster/boosters/frontend.md +82 -0
- package/template/.devbooster/boosters/i18n.md +63 -0
- package/template/.devbooster/boosters/implementation.md +82 -0
- package/template/.devbooster/boosters/investigation.md +96 -0
- package/template/.devbooster/boosters/mobile.md +56 -0
- package/template/.devbooster/boosters/performance.md +70 -0
- package/template/.devbooster/boosters/planning.md +92 -0
- package/template/.devbooster/boosters/refactor.md +17 -0
- package/template/.devbooster/boosters/review.md +88 -0
- package/template/.devbooster/boosters/security.md +60 -0
- package/template/.devbooster/boosters/seo.md +59 -0
- package/template/.devbooster/boosters/templates/implementation_heavy.md +130 -0
- package/template/.devbooster/boosters/templates/implementation_simple.md +109 -0
- package/template/.devbooster/boosters/templates/implementation_standard.md +134 -0
- package/template/.devbooster/boosters/testing.md +76 -0
- package/template/.devbooster/hub/personas/agent_backend-specialist.md +263 -0
- package/template/.devbooster/hub/personas/agent_code-archaeologist.md +106 -0
- package/template/.devbooster/hub/personas/agent_database-architect.md +226 -0
- package/template/.devbooster/hub/personas/agent_debugger.md +225 -0
- package/template/.devbooster/hub/personas/agent_devops-engineer.md +242 -0
- package/template/.devbooster/hub/personas/agent_documentation-writer.md +104 -0
- package/template/.devbooster/hub/personas/agent_explorer-agent.md +73 -0
- package/template/.devbooster/hub/personas/agent_frontend-specialist.md +593 -0
- package/template/.devbooster/hub/personas/agent_game-developer.md +162 -0
- package/template/.devbooster/hub/personas/agent_mobile-developer.md +377 -0
- package/template/.devbooster/hub/personas/agent_orchestrator.md +416 -0
- package/template/.devbooster/hub/personas/agent_penetration-tester.md +188 -0
- package/template/.devbooster/hub/personas/agent_performance-optimizer.md +187 -0
- package/template/.devbooster/hub/personas/agent_product-manager.md +112 -0
- package/template/.devbooster/hub/personas/agent_product-owner.md +95 -0
- package/template/.devbooster/hub/personas/agent_project-planner.md +406 -0
- package/template/.devbooster/hub/personas/agent_qa-automation-engineer.md +103 -0
- package/template/.devbooster/hub/personas/agent_security-auditor.md +170 -0
- package/template/.devbooster/hub/personas/agent_seo-specialist.md +111 -0
- package/template/.devbooster/hub/personas/agent_test-engineer.md +158 -0
- package/template/.devbooster/hub/personas/backend-specialist.md +263 -0
- package/template/.devbooster/hub/personas/brainstorm.md +113 -0
- package/template/.devbooster/hub/personas/code-archaeologist.md +106 -0
- package/template/.devbooster/hub/personas/create.md +59 -0
- package/template/.devbooster/hub/personas/database-architect.md +226 -0
- package/template/.devbooster/hub/personas/debug.md +103 -0
- package/template/.devbooster/hub/personas/debugger.md +225 -0
- package/template/.devbooster/hub/personas/deploy.md +176 -0
- package/template/.devbooster/hub/personas/devops-engineer.md +242 -0
- package/template/.devbooster/hub/personas/documentation-writer.md +104 -0
- package/template/.devbooster/hub/personas/enhance.md +63 -0
- package/template/.devbooster/hub/personas/explorer-agent.md +73 -0
- package/template/.devbooster/hub/personas/frontend-specialist.md +593 -0
- package/template/.devbooster/hub/personas/game-developer.md +162 -0
- package/template/.devbooster/hub/personas/mobile-developer.md +377 -0
- package/template/.devbooster/hub/personas/orchestrate.md +237 -0
- package/template/.devbooster/hub/personas/orchestrator.md +416 -0
- package/template/.devbooster/hub/personas/penetration-tester.md +188 -0
- package/template/.devbooster/hub/personas/performance-optimizer.md +187 -0
- package/template/.devbooster/hub/personas/plan.md +89 -0
- package/template/.devbooster/hub/personas/preview.md +81 -0
- package/template/.devbooster/hub/personas/product-manager.md +112 -0
- package/template/.devbooster/hub/personas/product-owner.md +95 -0
- package/template/.devbooster/hub/personas/project-planner.md +406 -0
- package/template/.devbooster/hub/personas/qa-automation-engineer.md +103 -0
- package/template/.devbooster/hub/personas/security-auditor.md +170 -0
- package/template/.devbooster/hub/personas/seo-specialist.md +111 -0
- package/template/.devbooster/hub/personas/skill_api-patterns.md +567 -0
- package/template/.devbooster/hub/personas/skill_app-builder.md +1855 -0
- package/template/.devbooster/hub/personas/skill_architecture.md +417 -0
- package/template/.devbooster/hub/personas/skill_bash-linux.md +199 -0
- package/template/.devbooster/hub/personas/skill_behavioral-modes.md +242 -0
- package/template/.devbooster/hub/personas/skill_brainstorming.md +519 -0
- package/template/.devbooster/hub/personas/skill_clean-code.md +201 -0
- package/template/.devbooster/hub/personas/skill_code-review-checklist.md +109 -0
- package/template/.devbooster/hub/personas/skill_database-design.md +340 -0
- package/template/.devbooster/hub/personas/skill_deployment-procedures.md +241 -0
- package/template/.devbooster/hub/personas/skill_doc.md +177 -0
- package/template/.devbooster/hub/personas/skill_documentation-templates.md +194 -0
- package/template/.devbooster/hub/personas/skill_frontend-design.md +3670 -0
- package/template/.devbooster/hub/personas/skill_game-development.md +167 -0
- package/template/.devbooster/hub/personas/skill_geo-fundamentals.md +156 -0
- package/template/.devbooster/hub/personas/skill_i18n-localization.md +154 -0
- package/template/.devbooster/hub/personas/skill_intelligent-routing.md +335 -0
- package/template/.devbooster/hub/personas/skill_lint-and-validate.md +45 -0
- package/template/.devbooster/hub/personas/skill_mcp-builder.md +176 -0
- package/template/.devbooster/hub/personas/skill_mobile-design.md +6150 -0
- package/template/.devbooster/hub/personas/skill_nextjs-react-expert.md +3487 -0
- package/template/.devbooster/hub/personas/skill_nodejs-best-practices.md +333 -0
- package/template/.devbooster/hub/personas/skill_parallel-agents.md +175 -0
- package/template/.devbooster/hub/personas/skill_performance-profiling.md +143 -0
- package/template/.devbooster/hub/personas/skill_plan-writing.md +152 -0
- package/template/.devbooster/hub/personas/skill_powershell-windows.md +167 -0
- package/template/.devbooster/hub/personas/skill_python-patterns.md +441 -0
- package/template/.devbooster/hub/personas/skill_red-team-tactics.md +199 -0
- package/template/.devbooster/hub/personas/skill_rust-pro.md +176 -0
- package/template/.devbooster/hub/personas/skill_seo-fundamentals.md +129 -0
- package/template/.devbooster/hub/personas/skill_server-management.md +161 -0
- package/template/.devbooster/hub/personas/skill_systematic-debugging.md +109 -0
- package/template/.devbooster/hub/personas/skill_tailwind-patterns.md +269 -0
- package/template/.devbooster/hub/personas/skill_tdd-workflow.md +149 -0
- package/template/.devbooster/hub/personas/skill_testing-patterns.md +178 -0
- package/template/.devbooster/hub/personas/skill_vulnerability-scanner.md +403 -0
- package/template/.devbooster/hub/personas/skill_web-design-guidelines.md +57 -0
- package/template/.devbooster/hub/personas/skill_webapp-testing.md +187 -0
- package/template/.devbooster/hub/personas/status.md +86 -0
- package/template/.devbooster/hub/personas/test-engineer.md +158 -0
- package/template/.devbooster/hub/personas/test.md +144 -0
- package/template/.devbooster/hub/personas/ui-ux-pro-max.md +296 -0
- package/template/.devbooster/hub/scripts/accessibility_checker.py +183 -0
- package/template/.devbooster/hub/scripts/api_validator.py +211 -0
- package/template/.devbooster/hub/scripts/auto_preview.py +148 -0
- package/template/.devbooster/hub/scripts/checklist.py +217 -0
- package/template/.devbooster/hub/scripts/convert_rules.py +222 -0
- package/template/.devbooster/hub/scripts/geo_checker.py +289 -0
- package/template/.devbooster/hub/scripts/i18n_checker.py +241 -0
- package/template/.devbooster/hub/scripts/lighthouse_audit.py +76 -0
- package/template/.devbooster/hub/scripts/lint_runner.py +184 -0
- package/template/.devbooster/hub/scripts/mobile_audit.py +670 -0
- package/template/.devbooster/hub/scripts/playwright_runner.py +173 -0
- package/template/.devbooster/hub/scripts/react_performance_checker.py +252 -0
- package/template/.devbooster/hub/scripts/schema_validator.py +172 -0
- package/template/.devbooster/hub/scripts/security_scan.py +458 -0
- package/template/.devbooster/hub/scripts/seo_checker.py +219 -0
- package/template/.devbooster/hub/scripts/session_manager.py +120 -0
- package/template/.devbooster/hub/scripts/test_runner.py +219 -0
- package/template/.devbooster/hub/scripts/type_coverage.py +173 -0
- package/template/.devbooster/hub/scripts/ux_audit.py +722 -0
- package/template/.devbooster/hub/scripts/verify_all.py +327 -0
- package/template/.devbooster/hub/skills/api-patterns/SKILL.md +81 -0
- package/template/.devbooster/hub/skills/api-patterns/api-style.md +42 -0
- package/template/.devbooster/hub/skills/api-patterns/auth.md +24 -0
- package/template/.devbooster/hub/skills/api-patterns/documentation.md +26 -0
- package/template/.devbooster/hub/skills/api-patterns/graphql.md +41 -0
- package/template/.devbooster/hub/skills/api-patterns/rate-limiting.md +31 -0
- package/template/.devbooster/hub/skills/api-patterns/response.md +37 -0
- package/template/.devbooster/hub/skills/api-patterns/rest.md +40 -0
- package/template/.devbooster/hub/skills/api-patterns/scripts/api_validator.py +211 -0
- package/template/.devbooster/hub/skills/api-patterns/security-testing.md +122 -0
- package/template/.devbooster/hub/skills/api-patterns/trpc.md +41 -0
- package/template/.devbooster/hub/skills/api-patterns/versioning.md +22 -0
- package/template/.devbooster/hub/skills/app-builder/SKILL.md +75 -0
- package/template/.devbooster/hub/skills/app-builder/agent-coordination.md +71 -0
- package/template/.devbooster/hub/skills/app-builder/feature-building.md +53 -0
- package/template/.devbooster/hub/skills/app-builder/project-detection.md +34 -0
- package/template/.devbooster/hub/skills/app-builder/scaffolding.md +118 -0
- package/template/.devbooster/hub/skills/app-builder/tech-stack.md +40 -0
- package/template/.devbooster/hub/skills/app-builder/templates/SKILL.md +39 -0
- package/template/.devbooster/hub/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/template/.devbooster/hub/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/template/.devbooster/hub/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/template/.devbooster/hub/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/template/.devbooster/hub/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/template/.devbooster/hub/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/template/.devbooster/hub/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/template/.devbooster/hub/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/template/.devbooster/hub/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/template/.devbooster/hub/skills/architecture/SKILL.md +55 -0
- package/template/.devbooster/hub/skills/architecture/context-discovery.md +43 -0
- package/template/.devbooster/hub/skills/architecture/examples.md +94 -0
- package/template/.devbooster/hub/skills/architecture/pattern-selection.md +68 -0
- package/template/.devbooster/hub/skills/architecture/patterns-reference.md +50 -0
- package/template/.devbooster/hub/skills/architecture/trade-off-analysis.md +77 -0
- package/template/.devbooster/hub/skills/bash-linux/SKILL.md +199 -0
- package/template/.devbooster/hub/skills/behavioral-modes/SKILL.md +242 -0
- package/template/.devbooster/hub/skills/brainstorming/SKILL.md +163 -0
- package/template/.devbooster/hub/skills/brainstorming/dynamic-questioning.md +350 -0
- package/template/.devbooster/hub/skills/clean-code/SKILL.md +201 -0
- package/template/.devbooster/hub/skills/code-review-checklist/SKILL.md +109 -0
- package/template/.devbooster/hub/skills/database-design/SKILL.md +52 -0
- package/template/.devbooster/hub/skills/database-design/database-selection.md +43 -0
- package/template/.devbooster/hub/skills/database-design/indexing.md +39 -0
- package/template/.devbooster/hub/skills/database-design/migrations.md +48 -0
- package/template/.devbooster/hub/skills/database-design/optimization.md +36 -0
- package/template/.devbooster/hub/skills/database-design/orm-selection.md +30 -0
- package/template/.devbooster/hub/skills/database-design/schema-design.md +56 -0
- package/template/.devbooster/hub/skills/database-design/scripts/schema_validator.py +172 -0
- package/template/.devbooster/hub/skills/deployment-procedures/SKILL.md +241 -0
- package/template/.devbooster/hub/skills/doc.md +177 -0
- package/template/.devbooster/hub/skills/documentation-templates/SKILL.md +194 -0
- package/template/.devbooster/hub/skills/frontend-design/SKILL.md +418 -0
- package/template/.devbooster/hub/skills/frontend-design/animation-guide.md +331 -0
- package/template/.devbooster/hub/skills/frontend-design/anti-generic-guide.md +252 -0
- package/template/.devbooster/hub/skills/frontend-design/color-system.md +311 -0
- package/template/.devbooster/hub/skills/frontend-design/decision-trees.md +418 -0
- package/template/.devbooster/hub/skills/frontend-design/motion-graphics.md +306 -0
- package/template/.devbooster/hub/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/template/.devbooster/hub/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/template/.devbooster/hub/skills/frontend-design/typography-system.md +345 -0
- package/template/.devbooster/hub/skills/frontend-design/ux-psychology.md +1116 -0
- package/template/.devbooster/hub/skills/frontend-design/visual-effects.md +383 -0
- package/template/.devbooster/hub/skills/game-development/2d-games/SKILL.md +119 -0
- package/template/.devbooster/hub/skills/game-development/3d-games/SKILL.md +135 -0
- package/template/.devbooster/hub/skills/game-development/SKILL.md +167 -0
- package/template/.devbooster/hub/skills/game-development/game-art/SKILL.md +185 -0
- package/template/.devbooster/hub/skills/game-development/game-audio/SKILL.md +190 -0
- package/template/.devbooster/hub/skills/game-development/game-design/SKILL.md +129 -0
- package/template/.devbooster/hub/skills/game-development/mobile-games/SKILL.md +108 -0
- package/template/.devbooster/hub/skills/game-development/multiplayer/SKILL.md +132 -0
- package/template/.devbooster/hub/skills/game-development/pc-games/SKILL.md +144 -0
- package/template/.devbooster/hub/skills/game-development/vr-ar/SKILL.md +123 -0
- package/template/.devbooster/hub/skills/game-development/web-games/SKILL.md +150 -0
- package/template/.devbooster/hub/skills/geo-fundamentals/SKILL.md +156 -0
- package/template/.devbooster/hub/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/template/.devbooster/hub/skills/i18n-localization/SKILL.md +154 -0
- package/template/.devbooster/hub/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/template/.devbooster/hub/skills/intelligent-routing/SKILL.md +335 -0
- package/template/.devbooster/hub/skills/lint-and-validate/SKILL.md +45 -0
- package/template/.devbooster/hub/skills/lint-and-validate/scripts/lint_runner.py +184 -0
- package/template/.devbooster/hub/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/template/.devbooster/hub/skills/mcp-builder/SKILL.md +176 -0
- package/template/.devbooster/hub/skills/mobile-design/SKILL.md +394 -0
- package/template/.devbooster/hub/skills/mobile-design/decision-trees.md +516 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-backend.md +491 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-color-system.md +420 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-debugging.md +122 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-navigation.md +458 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-performance.md +767 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-testing.md +356 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-typography.md +433 -0
- package/template/.devbooster/hub/skills/mobile-design/platform-android.md +666 -0
- package/template/.devbooster/hub/skills/mobile-design/platform-ios.md +561 -0
- package/template/.devbooster/hub/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/template/.devbooster/hub/skills/mobile-design/touch-psychology.md +537 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/SKILL.md +286 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/template/.devbooster/hub/skills/nodejs-best-practices/SKILL.md +333 -0
- package/template/.devbooster/hub/skills/parallel-agents/SKILL.md +175 -0
- package/template/.devbooster/hub/skills/performance-profiling/SKILL.md +143 -0
- package/template/.devbooster/hub/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/template/.devbooster/hub/skills/plan-writing/SKILL.md +152 -0
- package/template/.devbooster/hub/skills/powershell-windows/SKILL.md +167 -0
- package/template/.devbooster/hub/skills/python-patterns/SKILL.md +441 -0
- package/template/.devbooster/hub/skills/red-team-tactics/SKILL.md +199 -0
- package/template/.devbooster/hub/skills/rust-pro/SKILL.md +176 -0
- package/template/.devbooster/hub/skills/seo-fundamentals/SKILL.md +129 -0
- package/template/.devbooster/hub/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/template/.devbooster/hub/skills/server-management/SKILL.md +161 -0
- package/template/.devbooster/hub/skills/systematic-debugging/SKILL.md +109 -0
- package/template/.devbooster/hub/skills/tailwind-patterns/SKILL.md +269 -0
- package/template/.devbooster/hub/skills/tdd-workflow/SKILL.md +149 -0
- package/template/.devbooster/hub/skills/testing-patterns/SKILL.md +178 -0
- package/template/.devbooster/hub/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/template/.devbooster/hub/skills/vulnerability-scanner/SKILL.md +276 -0
- package/template/.devbooster/hub/skills/vulnerability-scanner/checklists.md +121 -0
- package/template/.devbooster/hub/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/template/.devbooster/hub/skills/web-design-guidelines/SKILL.md +57 -0
- package/template/.devbooster/hub/skills/webapp-testing/SKILL.md +187 -0
- package/template/.devbooster/hub/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/template/.devbooster/hub/workflows/brainstorm.md +113 -0
- package/template/.devbooster/hub/workflows/create.md +59 -0
- package/template/.devbooster/hub/workflows/debug.md +103 -0
- package/template/.devbooster/hub/workflows/deploy.md +176 -0
- package/template/.devbooster/hub/workflows/enhance.md +63 -0
- package/template/.devbooster/hub/workflows/orchestrate.md +237 -0
- package/template/.devbooster/hub/workflows/plan.md +89 -0
- package/template/.devbooster/hub/workflows/preview.md +81 -0
- package/template/.devbooster/hub/workflows/status.md +86 -0
- package/template/.devbooster/hub/workflows/test.md +144 -0
- package/template/.devbooster/hub/workflows/ui-ux-pro-max.md +296 -0
- package/template/.devbooster/rules/BACKEND.md +72 -0
- package/template/.devbooster/rules/COMERCIAL.md +69 -0
- package/template/.devbooster/rules/FRONTEND.md +76 -0
- package/template/.devbooster/rules/GUIDE.md +111 -0
- package/template/.devbooster/rules/PROJECT.md +83 -0
- package/template/.devbooster/rules/PROTOCOL.md +42 -0
- package/template/.devbooster/rules/USER_PREFERENCES.md +33 -0
- package/template/DEVBOOSTER_INIT.md +42 -0
|
@@ -0,0 +1,3670 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: Design thinking and decision-making for web UI. Use when designing components, layouts, color schemes, typography, or creating aesthetic interfaces. Teaches principles, not fixed values.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Frontend Design System
|
|
8
|
+
|
|
9
|
+
> **Philosophy:** Every pixel has purpose. Restraint is luxury. User psychology drives decisions.
|
|
10
|
+
> **Core Principle:** THINK, don't memorize. ASK, don't assume.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 🎯 Selective Reading Rule (MANDATORY)
|
|
15
|
+
|
|
16
|
+
**Read REQUIRED files always, OPTIONAL only when needed:**
|
|
17
|
+
|
|
18
|
+
| File | Status | When to Read |
|
|
19
|
+
|------|--------|--------------|
|
|
20
|
+
| [ux-psychology.md](ux-psychology.md) | 🔴 **REQUIRED** | Always read first! |
|
|
21
|
+
| [color-system.md](color-system.md) | ⚪ Optional | Color/palette decisions |
|
|
22
|
+
| [typography-system.md](typography-system.md) | ⚪ Optional | Font selection/pairing |
|
|
23
|
+
| [visual-effects.md](visual-effects.md) | ⚪ Optional | Glassmorphism, shadows, gradients |
|
|
24
|
+
| [animation-guide.md](animation-guide.md) | ⚪ Optional | Animation needed |
|
|
25
|
+
| [motion-graphics.md](motion-graphics.md) | ⚪ Optional | Lottie, GSAP, 3D |
|
|
26
|
+
| [decision-trees.md](decision-trees.md) | ⚪ Optional | Context templates |
|
|
27
|
+
|
|
28
|
+
> 🔴 **ux-psychology.md = ALWAYS READ. Others = only if relevant.**
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 🔧 Runtime Scripts
|
|
33
|
+
|
|
34
|
+
**Execute these for audits (don't read, just run):**
|
|
35
|
+
|
|
36
|
+
| Script | Purpose | Usage |
|
|
37
|
+
|--------|---------|-------|
|
|
38
|
+
| `scripts/ux_audit.py` | UX Psychology & Accessibility Audit | `python scripts/ux_audit.py <project_path>` |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## ⚠️ CRITICAL: ASK BEFORE ASSUMING (MANDATORY)
|
|
43
|
+
|
|
44
|
+
> **STOP! If the user's request is open-ended, DO NOT default to your favorites.**
|
|
45
|
+
|
|
46
|
+
### When User Prompt is Vague, ASK:
|
|
47
|
+
|
|
48
|
+
**Color not specified?** Ask:
|
|
49
|
+
> "What color palette do you prefer? (blue/green/orange/neutral/other?)"
|
|
50
|
+
|
|
51
|
+
**Style not specified?** Ask:
|
|
52
|
+
> "What style are you going for? (minimal/bold/retro/futuristic/organic?)"
|
|
53
|
+
|
|
54
|
+
**Layout not specified?** Ask:
|
|
55
|
+
> "Do you have a layout preference? (single column/grid/asymmetric/full-width?)"
|
|
56
|
+
|
|
57
|
+
### ⛔ DEFAULT TENDENCIES TO AVOID (ANTI-SAFE HARBOR):
|
|
58
|
+
|
|
59
|
+
| AI Default Tendency | Why It's Bad | Think Instead |
|
|
60
|
+
|---------------------|--------------|---------------|
|
|
61
|
+
| **Bento Grids (Modern Cliché)** | Used in every AI design | Why does this content NEED a grid? |
|
|
62
|
+
| **Hero Split (Left/Right)** | Predictable & Boring | How about Massive Typography or Vertical Narrative? |
|
|
63
|
+
| **Mesh/Aurora Gradients** | The "new" lazy background | What's a radical color pairing? |
|
|
64
|
+
| **Glassmorphism** | AI's idea of "premium" | How about solid, high-contrast flat? |
|
|
65
|
+
| **Deep Cyan / Fintech Blue** | Safe harbor from purple ban | Why not Red, Black, or Neon Green? |
|
|
66
|
+
| **"Orchestrate / Empower"** | AI-generated copywriting | How would a human say this? |
|
|
67
|
+
| Dark background + neon glow | Overused, "AI look" | What does the BRAND actually need? |
|
|
68
|
+
| **Rounded everything** | Generic/Safe | Where can I use sharp, brutalist edges? |
|
|
69
|
+
|
|
70
|
+
> 🔴 **"Every 'safe' structure you choose brings you one step closer to a generic template. TAKE RISKS."**
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 1. Constraint Analysis (ALWAYS FIRST)
|
|
75
|
+
|
|
76
|
+
Before any design work, ANSWER THESE or ASK USER:
|
|
77
|
+
|
|
78
|
+
| Constraint | Question | Why It Matters |
|
|
79
|
+
|------------|----------|----------------|
|
|
80
|
+
| **Timeline** | How much time? | Determines complexity |
|
|
81
|
+
| **Content** | Ready or placeholder? | Affects layout flexibility |
|
|
82
|
+
| **Brand** | Existing guidelines? | May dictate colors/fonts |
|
|
83
|
+
| **Tech** | What stack? | Affects capabilities |
|
|
84
|
+
| **Audience** | Who exactly? | Drives all visual decisions |
|
|
85
|
+
|
|
86
|
+
### Audience → Design Approach
|
|
87
|
+
|
|
88
|
+
| Audience | Think About |
|
|
89
|
+
|----------|-------------|
|
|
90
|
+
| **Gen Z** | Bold, fast, mobile-first, authentic |
|
|
91
|
+
| **Millennials** | Clean, minimal, value-driven |
|
|
92
|
+
| **Gen X** | Familiar, trustworthy, clear |
|
|
93
|
+
| **Boomers** | Readable, high contrast, simple |
|
|
94
|
+
| **B2B** | Professional, data-focused, trust |
|
|
95
|
+
| **Luxury** | Restrained elegance, whitespace |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 2. UX Psychology Principles
|
|
100
|
+
|
|
101
|
+
### Core Laws (Internalize These)
|
|
102
|
+
|
|
103
|
+
| Law | Principle | Application |
|
|
104
|
+
|-----|-----------|-------------|
|
|
105
|
+
| **Hick's Law** | More choices = slower decisions | Limit options, use progressive disclosure |
|
|
106
|
+
| **Fitts' Law** | Bigger + closer = easier to click | Size CTAs appropriately |
|
|
107
|
+
| **Miller's Law** | ~7 items in working memory | Chunk content into groups |
|
|
108
|
+
| **Von Restorff** | Different = memorable | Make CTAs visually distinct |
|
|
109
|
+
| **Serial Position** | First/last remembered most | Key info at start/end |
|
|
110
|
+
|
|
111
|
+
### Emotional Design Levels
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
VISCERAL (instant) → First impression: colors, imagery, overall feel
|
|
115
|
+
BEHAVIORAL (use) → Using it: speed, feedback, efficiency
|
|
116
|
+
REFLECTIVE (memory) → After: "I like what this says about me"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Trust Building
|
|
120
|
+
|
|
121
|
+
- Security indicators on sensitive actions
|
|
122
|
+
- Social proof where relevant
|
|
123
|
+
- Clear contact/support access
|
|
124
|
+
- Consistent, professional design
|
|
125
|
+
- Transparent policies
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 3. Layout Principles
|
|
130
|
+
|
|
131
|
+
### Golden Ratio (φ = 1.618)
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
Use for proportional harmony:
|
|
135
|
+
├── Content : Sidebar = roughly 62% : 38%
|
|
136
|
+
├── Each heading size = previous × 1.618 (for dramatic scale)
|
|
137
|
+
├── Spacing can follow: sm → md → lg (each × 1.618)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 8-Point Grid Concept
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
All spacing and sizing in multiples of 8:
|
|
144
|
+
├── Tight: 4px (half-step for micro)
|
|
145
|
+
├── Small: 8px
|
|
146
|
+
├── Medium: 16px
|
|
147
|
+
├── Large: 24px, 32px
|
|
148
|
+
├── XL: 48px, 64px, 80px
|
|
149
|
+
└── Adjust based on content density
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Key Sizing Principles
|
|
153
|
+
|
|
154
|
+
| Element | Consideration |
|
|
155
|
+
|---------|---------------|
|
|
156
|
+
| **Touch targets** | Minimum comfortable tap size |
|
|
157
|
+
| **Buttons** | Height based on importance hierarchy |
|
|
158
|
+
| **Inputs** | Match button height for alignment |
|
|
159
|
+
| **Cards** | Consistent padding, breathable |
|
|
160
|
+
| **Reading width** | 45-75 characters optimal |
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 4. Color Principles
|
|
165
|
+
|
|
166
|
+
### 60-30-10 Rule
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
60% → Primary/Background (calm, neutral base)
|
|
170
|
+
30% → Secondary (supporting areas)
|
|
171
|
+
10% → Accent (CTAs, highlights, attention)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Color Psychology (For Decision Making)
|
|
175
|
+
|
|
176
|
+
| If You Need... | Consider Hues | Avoid |
|
|
177
|
+
|----------------|---------------|-------|
|
|
178
|
+
| Trust, calm | Blue family | Aggressive reds |
|
|
179
|
+
| Growth, nature | Green family | Industrial grays |
|
|
180
|
+
| Energy, urgency | Orange, red | Passive blues |
|
|
181
|
+
| Luxury, creativity | Deep Teal, Gold, Emerald | Cheap-feeling brights |
|
|
182
|
+
| Clean, minimal | Neutrals | Overwhelming color |
|
|
183
|
+
|
|
184
|
+
### Selection Process
|
|
185
|
+
|
|
186
|
+
1. **What's the industry?** (narrows options)
|
|
187
|
+
2. **What's the emotion?** (picks primary)
|
|
188
|
+
3. **Light or dark mode?** (sets foundation)
|
|
189
|
+
4. **ASK USER** if not specified
|
|
190
|
+
|
|
191
|
+
For detailed color theory: [color-system.md](color-system.md)
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 5. Typography Principles
|
|
196
|
+
|
|
197
|
+
### Scale Selection
|
|
198
|
+
|
|
199
|
+
| Content Type | Scale Ratio | Feel |
|
|
200
|
+
|--------------|-------------|------|
|
|
201
|
+
| Dense UI | 1.125-1.2 | Compact, efficient |
|
|
202
|
+
| General web | 1.25 | Balanced (most common) |
|
|
203
|
+
| Editorial | 1.333 | Readable, spacious |
|
|
204
|
+
| Hero/display | 1.5-1.618 | Dramatic impact |
|
|
205
|
+
|
|
206
|
+
### Pairing Concept
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
Contrast + Harmony:
|
|
210
|
+
├── DIFFERENT enough for hierarchy
|
|
211
|
+
├── SIMILAR enough for cohesion
|
|
212
|
+
└── Usually: display + neutral, or serif + sans
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Readability Rules
|
|
216
|
+
|
|
217
|
+
- **Line length**: 45-75 characters optimal
|
|
218
|
+
- **Line height**: 1.4-1.6 for body text
|
|
219
|
+
- **Contrast**: Check WCAG requirements
|
|
220
|
+
- **Size**: 16px+ for body on web
|
|
221
|
+
|
|
222
|
+
For detailed typography: [typography-system.md](typography-system.md)
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 6. Visual Effects Principles
|
|
227
|
+
|
|
228
|
+
### Glassmorphism (When Appropriate)
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
Key properties:
|
|
232
|
+
├── Semi-transparent background
|
|
233
|
+
├── Backdrop blur
|
|
234
|
+
├── Subtle border for definition
|
|
235
|
+
└── ⚠️ **WARNING:** Standard blue/white glassmorphism is a modern cliché. Use it radically or not at all.
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Shadow Hierarchy
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
Elevation concept:
|
|
242
|
+
├── Higher elements = larger shadows
|
|
243
|
+
├── Y-offset > X-offset (light from above)
|
|
244
|
+
├── Multiple layers = more realistic
|
|
245
|
+
└── Dark mode: may need glow instead
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Gradient Usage
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
Harmonious gradients:
|
|
252
|
+
├── Adjacent colors on wheel (analogous)
|
|
253
|
+
├── OR same hue, different lightness
|
|
254
|
+
├── Avoid harsh complementary pairs
|
|
255
|
+
├── 🚫 **NO Mesh/Aurora Gradients** (floating blobs)
|
|
256
|
+
└── VARY from project to project radically
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
For complete effects guide: [visual-effects.md](visual-effects.md)
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## 7. Animation Principles
|
|
264
|
+
|
|
265
|
+
### Timing Concept
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
Duration based on:
|
|
269
|
+
├── Distance (further = longer)
|
|
270
|
+
├── Size (larger = slower)
|
|
271
|
+
├── Importance (critical = clear)
|
|
272
|
+
└── Context (urgent = fast, luxury = slow)
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Easing Selection
|
|
276
|
+
|
|
277
|
+
| Action | Easing | Why |
|
|
278
|
+
|--------|--------|-----|
|
|
279
|
+
| Entering | Ease-out | Decelerate, settle in |
|
|
280
|
+
| Leaving | Ease-in | Accelerate, exit |
|
|
281
|
+
| Emphasis | Ease-in-out | Smooth, deliberate |
|
|
282
|
+
| Playful | Bounce | Fun, energetic |
|
|
283
|
+
|
|
284
|
+
### Performance
|
|
285
|
+
|
|
286
|
+
- Animate only transform and opacity
|
|
287
|
+
- Respect reduced-motion preference
|
|
288
|
+
- Test on low-end devices
|
|
289
|
+
|
|
290
|
+
For animation patterns: [animation-guide.md](animation-guide.md), for advanced: [motion-graphics.md](motion-graphics.md)
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## 8. "Wow Factor" Checklist
|
|
295
|
+
|
|
296
|
+
### Premium Indicators
|
|
297
|
+
|
|
298
|
+
- [ ] Generous whitespace (luxury = breathing room)
|
|
299
|
+
- [ ] Subtle depth and dimension
|
|
300
|
+
- [ ] Smooth, purposeful animations
|
|
301
|
+
- [ ] Attention to detail (alignment, consistency)
|
|
302
|
+
- [ ] Cohesive visual rhythm
|
|
303
|
+
- [ ] Custom elements (not all defaults)
|
|
304
|
+
|
|
305
|
+
### Trust Builders
|
|
306
|
+
|
|
307
|
+
- [ ] Security cues where appropriate
|
|
308
|
+
- [ ] Social proof / testimonials
|
|
309
|
+
- [ ] Clear value proposition
|
|
310
|
+
- [ ] Professional imagery
|
|
311
|
+
- [ ] Consistent design language
|
|
312
|
+
|
|
313
|
+
### Emotional Triggers
|
|
314
|
+
|
|
315
|
+
- [ ] Hero that evokes intended emotion
|
|
316
|
+
- [ ] Human elements (faces, stories)
|
|
317
|
+
- [ ] Progress/achievement indicators
|
|
318
|
+
- [ ] Moments of delight
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## 9. Anti-Patterns (What NOT to Do)
|
|
323
|
+
|
|
324
|
+
### ❌ Lazy Design Indicators
|
|
325
|
+
|
|
326
|
+
- Default system fonts without consideration
|
|
327
|
+
- Stock imagery that doesn't match
|
|
328
|
+
- Inconsistent spacing
|
|
329
|
+
- Too many competing colors
|
|
330
|
+
- Walls of text without hierarchy
|
|
331
|
+
- Inaccessible contrast
|
|
332
|
+
|
|
333
|
+
### ❌ AI Tendency Patterns (AVOID!)
|
|
334
|
+
|
|
335
|
+
- **Same colors every project**
|
|
336
|
+
- **Dark + neon as default**
|
|
337
|
+
- **Purple/violet everything (PURPLE BAN ✅)**
|
|
338
|
+
- **Bento grids for simple landing pages**
|
|
339
|
+
- **Mesh Gradients & Glow Effects**
|
|
340
|
+
- **Same layout structure / Vercel clone**
|
|
341
|
+
- **Not asking user preferences**
|
|
342
|
+
|
|
343
|
+
### ❌ Dark Patterns (Unethical)
|
|
344
|
+
|
|
345
|
+
- Hidden costs
|
|
346
|
+
- Fake urgency
|
|
347
|
+
- Forced actions
|
|
348
|
+
- Deceptive UI
|
|
349
|
+
- Confirmshaming
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## 10. Decision Process Summary
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
For EVERY design task:
|
|
357
|
+
|
|
358
|
+
1. CONSTRAINTS
|
|
359
|
+
└── What's the timeline, brand, tech, audience?
|
|
360
|
+
└── If unclear → ASK
|
|
361
|
+
|
|
362
|
+
2. CONTENT
|
|
363
|
+
└── What content exists?
|
|
364
|
+
└── What's the hierarchy?
|
|
365
|
+
|
|
366
|
+
3. STYLE DIRECTION
|
|
367
|
+
└── What's appropriate for context?
|
|
368
|
+
└── If unclear → ASK (don't default!)
|
|
369
|
+
|
|
370
|
+
4. EXECUTION
|
|
371
|
+
└── Apply principles above
|
|
372
|
+
└── Check against anti-patterns
|
|
373
|
+
|
|
374
|
+
5. REVIEW
|
|
375
|
+
└── "Does this serve the user?"
|
|
376
|
+
└── "Is this different from my defaults?"
|
|
377
|
+
└── "Would I be proud of this?"
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## Reference Files
|
|
383
|
+
|
|
384
|
+
For deeper guidance on specific areas:
|
|
385
|
+
|
|
386
|
+
- [color-system.md](color-system.md) - Color theory and selection process
|
|
387
|
+
- [typography-system.md](typography-system.md) - Font pairing and scale decisions
|
|
388
|
+
- [visual-effects.md](visual-effects.md) - Effects principles and techniques
|
|
389
|
+
- [animation-guide.md](animation-guide.md) - Motion design principles
|
|
390
|
+
- [motion-graphics.md](motion-graphics.md) - Advanced: Lottie, GSAP, SVG, 3D, Particles
|
|
391
|
+
- [decision-trees.md](decision-trees.md) - Context-specific templates
|
|
392
|
+
- [ux-psychology.md](ux-psychology.md) - User psychology deep dive
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## Related Skills
|
|
397
|
+
|
|
398
|
+
| Skill | When to Use |
|
|
399
|
+
|-------|-------------|
|
|
400
|
+
| **frontend-design** (this) | Before coding - Learn design principles (color, typography, UX psychology) |
|
|
401
|
+
| **[web-design-guidelines](../web-design-guidelines/SKILL.md)** | After coding - Audit for accessibility, performance, and best practices |
|
|
402
|
+
|
|
403
|
+
## Post-Design Workflow
|
|
404
|
+
|
|
405
|
+
After implementing your design, run the audit:
|
|
406
|
+
|
|
407
|
+
```
|
|
408
|
+
1. DESIGN → Read frontend-design principles ← YOU ARE HERE
|
|
409
|
+
2. CODE → Implement the design
|
|
410
|
+
3. AUDIT → Run web-design-guidelines review
|
|
411
|
+
4. FIX → Address findings from audit
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
> **Next Step:** After coding, use `web-design-guidelines` skill to audit your implementation for accessibility, focus states, animations, and performance issues.
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
> **Remember:** Design is THINKING, not copying. Every project deserves fresh consideration based on its unique context and users. **Avoid the Modern SaaS Safe Harbor!**
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
---
|
|
423
|
+
# Content from animation-guide.md
|
|
424
|
+
|
|
425
|
+
# Animation Guidelines Reference
|
|
426
|
+
|
|
427
|
+
> Animation principles and timing psychology - learn to decide, not copy.
|
|
428
|
+
> **No fixed durations to memorize - understand what affects timing.**
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## 1. Duration Principles
|
|
433
|
+
|
|
434
|
+
### What Affects Timing
|
|
435
|
+
|
|
436
|
+
```
|
|
437
|
+
Factors that determine animation speed:
|
|
438
|
+
├── DISTANCE: Further travel = longer duration
|
|
439
|
+
├── SIZE: Larger elements = slower animations
|
|
440
|
+
├── COMPLEXITY: Complex = slower to process
|
|
441
|
+
├── IMPORTANCE: Critical actions = clear feedback
|
|
442
|
+
└── CONTEXT: Urgent = fast, luxurious = slow
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### Duration Ranges by Purpose
|
|
446
|
+
|
|
447
|
+
| Purpose | Range | Why |
|
|
448
|
+
|---------|-------|-----|
|
|
449
|
+
| Instant feedback | 50-100ms | Below perception threshold |
|
|
450
|
+
| Micro-interactions | 100-200ms | Quick but noticeable |
|
|
451
|
+
| Standard transitions | 200-300ms | Comfortable pace |
|
|
452
|
+
| Complex animations | 300-500ms | Time to follow |
|
|
453
|
+
| Page transitions | 400-600ms | Smooth handoff |
|
|
454
|
+
| **Wow/Premium Effects** | 800ms+ | Dramatic, organic spring-based, layered |
|
|
455
|
+
|
|
456
|
+
### Choosing Duration
|
|
457
|
+
|
|
458
|
+
Ask yourself:
|
|
459
|
+
1. How far is the element moving?
|
|
460
|
+
2. How important is it to notice this change?
|
|
461
|
+
3. Is the user waiting, or is this background?
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## 2. Easing Principles
|
|
466
|
+
|
|
467
|
+
### What Easing Does
|
|
468
|
+
|
|
469
|
+
```
|
|
470
|
+
Easing = how speed changes over time
|
|
471
|
+
├── Linear: constant speed (mechanical, robotic)
|
|
472
|
+
├── Ease-out: fast start, slow end (natural entry)
|
|
473
|
+
├── Ease-in: slow start, fast end (natural exit)
|
|
474
|
+
└── Ease-in-out: slow both ends (smooth, deliberate)
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### When to Use Each
|
|
478
|
+
|
|
479
|
+
| Easing | Best For | Feels Like |
|
|
480
|
+
|--------|----------|------------|
|
|
481
|
+
| **Ease-out** | Elements entering | Arriving, settling |
|
|
482
|
+
| **Ease-in** | Elements leaving | Departing, exiting |
|
|
483
|
+
| **Ease-in-out** | Emphasis, loops | Deliberate, smooth |
|
|
484
|
+
| **Linear** | Continuous motion | Mechanical, constant |
|
|
485
|
+
| **Bounce/Elastic** | Playful UI | Fun, energetic |
|
|
486
|
+
|
|
487
|
+
### The Pattern
|
|
488
|
+
|
|
489
|
+
```css
|
|
490
|
+
/* Entering view = ease-out (decelerate) */
|
|
491
|
+
.enter {
|
|
492
|
+
animation-timing-function: ease-out;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/* Leaving view = ease-in (accelerate) */
|
|
496
|
+
.exit {
|
|
497
|
+
animation-timing-function: ease-in;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/* Continuous = ease-in-out */
|
|
501
|
+
.continuous {
|
|
502
|
+
animation-timing-function: ease-in-out;
|
|
503
|
+
}
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
## 3. Micro-Interaction Principles
|
|
509
|
+
|
|
510
|
+
### What Makes Good Micro-Interactions
|
|
511
|
+
|
|
512
|
+
```
|
|
513
|
+
Purpose of micro-interactions:
|
|
514
|
+
├── FEEDBACK: Confirm the action happened
|
|
515
|
+
├── GUIDANCE: Show what's possible
|
|
516
|
+
├── STATUS: Indicate current state
|
|
517
|
+
└── DELIGHT: Small moments of joy
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Button States
|
|
521
|
+
|
|
522
|
+
```
|
|
523
|
+
Hover → slight visual change (lift, color, scale)
|
|
524
|
+
Active → pressed feeling (scale down, shadow change)
|
|
525
|
+
Focus → clear indicator (outline, ring)
|
|
526
|
+
Loading → progress indicator (spinner, skeleton)
|
|
527
|
+
Success → confirmation (check, color)
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### Principles
|
|
531
|
+
|
|
532
|
+
1. **Respond immediately** (under 100ms perception)
|
|
533
|
+
2. **Match the action** (press = `scale(0.95)`, hover = `translateY(-4px) + glow`)
|
|
534
|
+
3. **Be bold but smooth** (Usta işi hissettir)
|
|
535
|
+
4. **Be consistent** (same actions = same feedback)
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
## 4. Loading States Principles
|
|
540
|
+
|
|
541
|
+
### Types by Context
|
|
542
|
+
|
|
543
|
+
| Situation | Approach |
|
|
544
|
+
|-----------|----------|
|
|
545
|
+
| Quick load (<1s) | No indicator needed |
|
|
546
|
+
| Medium (1-3s) | Spinner or simple animation |
|
|
547
|
+
| Long (3s+) | Progress bar or skeleton |
|
|
548
|
+
| Unknown duration | Indeterminate indicator |
|
|
549
|
+
|
|
550
|
+
### Skeleton Screens
|
|
551
|
+
|
|
552
|
+
```
|
|
553
|
+
Purpose: Reduce perceived wait time
|
|
554
|
+
├── Show layout shape immediately
|
|
555
|
+
├── Animate subtly (shimmer, pulse)
|
|
556
|
+
├── Replace with content when ready
|
|
557
|
+
└── Feels faster than spinner
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
### Progress Indicators
|
|
561
|
+
|
|
562
|
+
```
|
|
563
|
+
When to show progress:
|
|
564
|
+
├── User-initiated action
|
|
565
|
+
├── File uploads/downloads
|
|
566
|
+
├── Multi-step processes
|
|
567
|
+
└── Long operations
|
|
568
|
+
|
|
569
|
+
When NOT needed:
|
|
570
|
+
├── Very quick operations
|
|
571
|
+
├── Background tasks
|
|
572
|
+
└── Initial page loads (skeleton better)
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
## 5. Page Transitions Principles
|
|
578
|
+
|
|
579
|
+
### Transition Strategy
|
|
580
|
+
|
|
581
|
+
```
|
|
582
|
+
Simple rule: exit fast, enter slower
|
|
583
|
+
├── Outgoing content fades quickly
|
|
584
|
+
├── Incoming content animates in
|
|
585
|
+
└── Avoids "everything moving at once"
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
### Common Patterns
|
|
589
|
+
|
|
590
|
+
| Pattern | When to Use |
|
|
591
|
+
|---------|-------------|
|
|
592
|
+
| **Fade** | Safe default, works everywhere |
|
|
593
|
+
| **Slide** | Sequential navigation (prev/next) |
|
|
594
|
+
| **Scale** | Opening/closing modals |
|
|
595
|
+
| **Shared element** | Maintaining visual continuity |
|
|
596
|
+
|
|
597
|
+
### Direction Matching
|
|
598
|
+
|
|
599
|
+
```
|
|
600
|
+
Navigation direction = animation direction
|
|
601
|
+
├── Forward → slide from right
|
|
602
|
+
├── Backward → slide from left
|
|
603
|
+
├── Deeper → scale up from center
|
|
604
|
+
├── Back up → scale down
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
## 6. Scroll Animation Principles
|
|
610
|
+
|
|
611
|
+
### Progressive Reveal
|
|
612
|
+
|
|
613
|
+
```
|
|
614
|
+
Content appears as user scrolls:
|
|
615
|
+
├── Reduces initial cognitive load
|
|
616
|
+
├── Rewards exploration
|
|
617
|
+
├── Must not feel sluggish
|
|
618
|
+
└── Option to disable (accessibility)
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
### Trigger Points
|
|
622
|
+
|
|
623
|
+
| When to Trigger | Effect |
|
|
624
|
+
|-----------------|--------|
|
|
625
|
+
| Just entering viewport | Standard reveal |
|
|
626
|
+
| Centered in viewport | For emphasis |
|
|
627
|
+
| Partially visible | Earlier reveal |
|
|
628
|
+
| Fully visible | Late trigger |
|
|
629
|
+
|
|
630
|
+
### Animation Properties
|
|
631
|
+
|
|
632
|
+
- Fade in (opacity)
|
|
633
|
+
- Slide up (transform)
|
|
634
|
+
- Scale (transform)
|
|
635
|
+
- Combination of above
|
|
636
|
+
|
|
637
|
+
### Performance
|
|
638
|
+
|
|
639
|
+
- Use Intersection Observer
|
|
640
|
+
- Animate only transform/opacity
|
|
641
|
+
- Reduce on mobile if needed
|
|
642
|
+
|
|
643
|
+
---
|
|
644
|
+
|
|
645
|
+
## 7. Hover Effects Principles
|
|
646
|
+
|
|
647
|
+
### Matching Effect to Action
|
|
648
|
+
|
|
649
|
+
| Element | Effect | Intent |
|
|
650
|
+
|---------|--------|--------|
|
|
651
|
+
| **Clickable card** | Lift + shadow | "This is interactive" |
|
|
652
|
+
| **Button** | Color/brightness change | "Press me" |
|
|
653
|
+
| **Image** | Zoom/scale | "View closer" |
|
|
654
|
+
| **Link** | Underline/color | "Navigate here" |
|
|
655
|
+
|
|
656
|
+
### Principles
|
|
657
|
+
|
|
658
|
+
1. **Signal interactivity** - hover shows it's clickable
|
|
659
|
+
2. **Don't overdo it** - subtle changes work
|
|
660
|
+
3. **Match importance** - bigger change = more important
|
|
661
|
+
4. **Touch alternatives** - hover doesn't work on mobile
|
|
662
|
+
|
|
663
|
+
---
|
|
664
|
+
|
|
665
|
+
## 8. Feedback Animation Principles
|
|
666
|
+
|
|
667
|
+
### Success States
|
|
668
|
+
|
|
669
|
+
```
|
|
670
|
+
Celebrate appropriately:
|
|
671
|
+
├── Minor action → subtle check/color
|
|
672
|
+
├── Major action → more pronounced animation
|
|
673
|
+
├── Completion → satisfying animation
|
|
674
|
+
└── Match brand personality
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
### Error States
|
|
678
|
+
|
|
679
|
+
```
|
|
680
|
+
Draw attention without panic:
|
|
681
|
+
├── Color change (semantic red)
|
|
682
|
+
├── Shake animation (brief!)
|
|
683
|
+
├── Focus on error field
|
|
684
|
+
└── Clear messaging
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
### Timing
|
|
688
|
+
|
|
689
|
+
- Success: slightly longer (enjoy the moment)
|
|
690
|
+
- Error: quick (don't delay action)
|
|
691
|
+
- Loading: continuous until complete
|
|
692
|
+
|
|
693
|
+
---
|
|
694
|
+
|
|
695
|
+
## 9. Performance Principles
|
|
696
|
+
|
|
697
|
+
### What's Cheap to Animate
|
|
698
|
+
|
|
699
|
+
```
|
|
700
|
+
GPU-accelerated (FAST):
|
|
701
|
+
├── transform: translate, scale, rotate
|
|
702
|
+
└── opacity: 0 to 1
|
|
703
|
+
|
|
704
|
+
CPU-intensive (SLOW):
|
|
705
|
+
├── width, height
|
|
706
|
+
├── top, left, right, bottom
|
|
707
|
+
├── margin, padding
|
|
708
|
+
├── border-radius changes
|
|
709
|
+
└── box-shadow changes
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
### Optimization Strategies
|
|
713
|
+
|
|
714
|
+
1. **Animate transform/opacity** whenever possible
|
|
715
|
+
2. **Avoid layout triggers** (size/position changes)
|
|
716
|
+
3. **Use will-change sparingly** (hints to browser)
|
|
717
|
+
4. **Test on low-end devices** (not just dev machine)
|
|
718
|
+
|
|
719
|
+
### Respecting User Preferences
|
|
720
|
+
|
|
721
|
+
```css
|
|
722
|
+
@media (prefers-reduced-motion: reduce) {
|
|
723
|
+
/* Honor this preference */
|
|
724
|
+
/* Essential animations only */
|
|
725
|
+
/* Reduce or remove decorative motion */
|
|
726
|
+
}
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
---
|
|
730
|
+
|
|
731
|
+
## 10. Animation Decision Checklist
|
|
732
|
+
|
|
733
|
+
Before adding animation:
|
|
734
|
+
|
|
735
|
+
- [ ] **Is there a purpose?** (feedback/guidance/delight)
|
|
736
|
+
- [ ] **Is timing appropriate?** (not too fast/slow)
|
|
737
|
+
- [ ] **Did you pick correct easing?** (enter/exit/emphasis)
|
|
738
|
+
- [ ] **Is it performant?** (transform/opacity only)
|
|
739
|
+
- [ ] **Tested reduced motion?** (accessibility)
|
|
740
|
+
- [ ] **Consistent with other animations?** (same timing feel)
|
|
741
|
+
- [ ] **Not your default settings?** (variety check)
|
|
742
|
+
- [ ] **Asked user about style if unclear?**
|
|
743
|
+
|
|
744
|
+
### Anti-Patterns
|
|
745
|
+
|
|
746
|
+
- ❌ Same timing values every project
|
|
747
|
+
- ❌ Animation for animation's sake
|
|
748
|
+
- ❌ Ignoring reduced-motion preference
|
|
749
|
+
- ❌ Animating expensive properties
|
|
750
|
+
- ❌ Too many things animating at once
|
|
751
|
+
- ❌ Delays that frustrate users
|
|
752
|
+
|
|
753
|
+
---
|
|
754
|
+
|
|
755
|
+
> **Remember**: Animation is communication. Every motion should have meaning and serve the user experience.
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
---
|
|
760
|
+
# Content from color-system.md
|
|
761
|
+
|
|
762
|
+
# Color System Reference
|
|
763
|
+
|
|
764
|
+
> Color theory principles, selection process, and decision-making guidelines.
|
|
765
|
+
> **No memorized hex codes - learn to THINK about color.**
|
|
766
|
+
|
|
767
|
+
---
|
|
768
|
+
|
|
769
|
+
## 1. Color Theory Fundamentals
|
|
770
|
+
|
|
771
|
+
### The Color Wheel
|
|
772
|
+
|
|
773
|
+
```
|
|
774
|
+
YELLOW
|
|
775
|
+
│
|
|
776
|
+
Yellow- │ Yellow-
|
|
777
|
+
Green │ Orange
|
|
778
|
+
╲ │ ╱
|
|
779
|
+
╲ │ ╱
|
|
780
|
+
GREEN ─────────── ● ─────────── ORANGE
|
|
781
|
+
╱ │ ╲
|
|
782
|
+
╱ │ ╲
|
|
783
|
+
Blue- │ Red-
|
|
784
|
+
Green │ Orange
|
|
785
|
+
│
|
|
786
|
+
RED
|
|
787
|
+
│
|
|
788
|
+
PURPLE
|
|
789
|
+
╱ ╲
|
|
790
|
+
Blue- Red-
|
|
791
|
+
Purple Purple
|
|
792
|
+
╲ ╱
|
|
793
|
+
BLUE
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
### Color Relationships
|
|
797
|
+
|
|
798
|
+
| Scheme | How to Create | When to Use |
|
|
799
|
+
|--------|---------------|-------------|
|
|
800
|
+
| **Monochromatic** | Pick ONE hue, vary only lightness/saturation | Minimal, professional, cohesive |
|
|
801
|
+
| **Analogous** | Pick 2-3 ADJACENT hues on wheel | Harmonious, calm, nature-inspired |
|
|
802
|
+
| **Complementary** | Pick OPPOSITE hues on wheel | High contrast, vibrant, attention |
|
|
803
|
+
| **Split-Complementary** | Base + 2 colors adjacent to complement | Dynamic but balanced |
|
|
804
|
+
| **Triadic** | 3 hues EQUIDISTANT on wheel | Vibrant, playful, creative |
|
|
805
|
+
|
|
806
|
+
### How to Choose a Scheme:
|
|
807
|
+
1. **What's the project mood?** Calm → Analogous. Bold → Complementary.
|
|
808
|
+
2. **How many colors needed?** Minimal → Monochromatic. Complex → Triadic.
|
|
809
|
+
3. **Who's the audience?** Conservative → Monochromatic. Young → Triadic.
|
|
810
|
+
|
|
811
|
+
---
|
|
812
|
+
|
|
813
|
+
## 2. The 60-30-10 Rule
|
|
814
|
+
|
|
815
|
+
### Distribution Principle
|
|
816
|
+
```
|
|
817
|
+
┌─────────────────────────────────────────────────┐
|
|
818
|
+
│ │
|
|
819
|
+
│ 60% PRIMARY (Background, large areas) │
|
|
820
|
+
│ → Should be neutral or calming │
|
|
821
|
+
│ → Carries the overall tone │
|
|
822
|
+
│ │
|
|
823
|
+
├────────────────────────────────────┬────────────┤
|
|
824
|
+
│ │ │
|
|
825
|
+
│ 30% SECONDARY │ 10% ACCENT │
|
|
826
|
+
│ (Cards, sections, headers) │ (CTAs, │
|
|
827
|
+
│ → Supports without dominating │ highlights)│
|
|
828
|
+
│ │ → Draws │
|
|
829
|
+
│ │ attention│
|
|
830
|
+
└────────────────────────────────────┴────────────┘
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
### Implementation Pattern
|
|
834
|
+
```css
|
|
835
|
+
:root {
|
|
836
|
+
/* 60% - Pick based on light/dark mode and mood */
|
|
837
|
+
--color-bg: /* neutral: white, off-white, or dark gray */
|
|
838
|
+
--color-surface: /* slightly different from bg */
|
|
839
|
+
|
|
840
|
+
/* 30% - Pick based on brand or context */
|
|
841
|
+
--color-secondary: /* muted version of primary or neutral */
|
|
842
|
+
|
|
843
|
+
/* 10% - Pick based on desired action/emotion */
|
|
844
|
+
--color-accent: /* vibrant, attention-grabbing */
|
|
845
|
+
}
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
---
|
|
849
|
+
|
|
850
|
+
## 3. Color Psychology - Meaning & Selection
|
|
851
|
+
|
|
852
|
+
### How to Choose Based on Context
|
|
853
|
+
|
|
854
|
+
| If Project Is... | Consider These Hues | Why |
|
|
855
|
+
|------------------|---------------------|-----|
|
|
856
|
+
| **Finance, Tech, Healthcare** | Blues, Teals | Trust, stability, calm |
|
|
857
|
+
| **Eco, Wellness, Nature** | Greens, Earth tones | Growth, health, organic |
|
|
858
|
+
| **Food, Energy, Youth** | Orange, Yellow, Warm | Appetite, excitement, warmth |
|
|
859
|
+
| **Luxury, Beauty, Creative** | Deep Teal, Gold, Black | Sophistication, premium |
|
|
860
|
+
| **Urgency, Sales, Alerts** | Red, Orange | Action, attention, passion |
|
|
861
|
+
|
|
862
|
+
### Emotional Associations (For Decision Making)
|
|
863
|
+
|
|
864
|
+
| Hue Family | Positive Associations | Cautions |
|
|
865
|
+
|------------|----------------------|----------|
|
|
866
|
+
| **Blue** | Trust, calm, professional | Can feel cold, corporate |
|
|
867
|
+
| **Green** | Growth, nature, success | Can feel boring if overused |
|
|
868
|
+
| **Red** | Passion, urgency, energy | High arousal, use sparingly |
|
|
869
|
+
| **Orange** | Warmth, friendly, creative | Can feel cheap if saturated |
|
|
870
|
+
| **Purple** | ⚠️ **BANNED** - AI overuses this! | Use Deep Teal/Maroon/Emerald instead |
|
|
871
|
+
| **Yellow** | Optimism, attention, happy | Hard to read, use as accent |
|
|
872
|
+
| **Black** | Elegance, power, modern | Can feel heavy |
|
|
873
|
+
| **White** | Clean, minimal, open | Can feel sterile |
|
|
874
|
+
|
|
875
|
+
### Selection Process:
|
|
876
|
+
1. **What industry?** → Narrow to 2-3 hue families
|
|
877
|
+
2. **What emotion?** → Pick primary hue
|
|
878
|
+
3. **What contrast?** → Decide light vs dark mode
|
|
879
|
+
4. **ASK USER** → Confirm before proceeding
|
|
880
|
+
|
|
881
|
+
---
|
|
882
|
+
|
|
883
|
+
## 4. Palette Generation Principles
|
|
884
|
+
|
|
885
|
+
### From a Single Color (HSL Method)
|
|
886
|
+
|
|
887
|
+
Instead of memorizing hex codes, learn to **manipulate HSL**:
|
|
888
|
+
|
|
889
|
+
```
|
|
890
|
+
HSL = Hue, Saturation, Lightness
|
|
891
|
+
|
|
892
|
+
Hue (0-360): The color family
|
|
893
|
+
0/360 = Red
|
|
894
|
+
60 = Yellow
|
|
895
|
+
120 = Green
|
|
896
|
+
180 = Cyan
|
|
897
|
+
240 = Blue
|
|
898
|
+
300 = Purple
|
|
899
|
+
|
|
900
|
+
Saturation (0-100%): Color intensity
|
|
901
|
+
Low = Muted, sophisticated
|
|
902
|
+
High = Vibrant, energetic
|
|
903
|
+
|
|
904
|
+
Lightness (0-100%): Brightness
|
|
905
|
+
0% = Black
|
|
906
|
+
50% = Pure color
|
|
907
|
+
100% = White
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
### Generating a Full Palette
|
|
911
|
+
|
|
912
|
+
Given ANY base color, create a scale:
|
|
913
|
+
|
|
914
|
+
```
|
|
915
|
+
Lightness Scale:
|
|
916
|
+
50 (lightest) → L: 97%
|
|
917
|
+
100 → L: 94%
|
|
918
|
+
200 → L: 86%
|
|
919
|
+
300 → L: 74%
|
|
920
|
+
400 → L: 66%
|
|
921
|
+
500 (base) → L: 50-60%
|
|
922
|
+
600 → L: 48%
|
|
923
|
+
700 → L: 38%
|
|
924
|
+
800 → L: 30%
|
|
925
|
+
900 (darkest) → L: 20%
|
|
926
|
+
```
|
|
927
|
+
|
|
928
|
+
### Saturation Adjustments
|
|
929
|
+
|
|
930
|
+
| Context | Saturation Level |
|
|
931
|
+
|---------|-----------------|
|
|
932
|
+
| **Professional/Corporate** | Lower (40-60%) |
|
|
933
|
+
| **Playful/Youth** | Higher (70-90%) |
|
|
934
|
+
| **Dark Mode** | Reduce by 10-20% |
|
|
935
|
+
| **Accessibility** | Ensure contrast, may need adjustment |
|
|
936
|
+
|
|
937
|
+
---
|
|
938
|
+
|
|
939
|
+
## 5. Context-Based Selection Guide
|
|
940
|
+
|
|
941
|
+
### Instead of Copying Palettes, Follow This Process:
|
|
942
|
+
|
|
943
|
+
**Step 1: Identify the Context**
|
|
944
|
+
```
|
|
945
|
+
What type of project?
|
|
946
|
+
├── E-commerce → Need trust + urgency balance
|
|
947
|
+
├── SaaS/Dashboard → Need low-fatigue, data focus
|
|
948
|
+
├── Health/Wellness → Need calming, natural feel
|
|
949
|
+
├── Luxury/Premium → Need understated elegance
|
|
950
|
+
├── Creative/Portfolio → Need personality, memorable
|
|
951
|
+
└── Other → ASK the user
|
|
952
|
+
```
|
|
953
|
+
|
|
954
|
+
**Step 2: Select Primary Hue Family**
|
|
955
|
+
```
|
|
956
|
+
Based on context, pick ONE:
|
|
957
|
+
- Blue family (trust)
|
|
958
|
+
- Green family (growth)
|
|
959
|
+
- Warm family (energy)
|
|
960
|
+
- Neutral family (elegant)
|
|
961
|
+
- OR ask user preference
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
**Step 3: Decide Light/Dark Mode**
|
|
965
|
+
```
|
|
966
|
+
Consider:
|
|
967
|
+
- User preference?
|
|
968
|
+
- Industry standard?
|
|
969
|
+
- Content type? (text-heavy = light preferred)
|
|
970
|
+
- Time of use? (evening app = dark option)
|
|
971
|
+
```
|
|
972
|
+
|
|
973
|
+
**Step 4: Generate Palette Using Principles**
|
|
974
|
+
- Use HSL manipulation
|
|
975
|
+
- Follow 60-30-10 rule
|
|
976
|
+
- Check contrast (WCAG)
|
|
977
|
+
- Test with actual content
|
|
978
|
+
|
|
979
|
+
---
|
|
980
|
+
|
|
981
|
+
## 6. Dark Mode Principles
|
|
982
|
+
|
|
983
|
+
### Key Rules (No Fixed Codes)
|
|
984
|
+
|
|
985
|
+
1. **Never pure black** → Use very dark gray with slight hue
|
|
986
|
+
2. **Never pure white text** → Use 87-92% lightness
|
|
987
|
+
3. **Reduce saturation** → Vibrant colors strain eyes in dark mode
|
|
988
|
+
4. **Elevation = brightness** → Higher elements slightly lighter
|
|
989
|
+
|
|
990
|
+
### Contrast in Dark Mode
|
|
991
|
+
|
|
992
|
+
```
|
|
993
|
+
Background layers (darker → lighter as elevation increases):
|
|
994
|
+
Layer 0 (base) → Darkest
|
|
995
|
+
Layer 1 (cards) → Slightly lighter
|
|
996
|
+
Layer 2 (modals) → Even lighter
|
|
997
|
+
Layer 3 (popups) → Lightest dark
|
|
998
|
+
```
|
|
999
|
+
|
|
1000
|
+
### Adapting Colors for Dark Mode
|
|
1001
|
+
|
|
1002
|
+
| Light Mode | Dark Mode Adjustment |
|
|
1003
|
+
|------------|---------------------|
|
|
1004
|
+
| High saturation accent | Reduce saturation 10-20% |
|
|
1005
|
+
| Pure white background | Dark gray with brand hue tint |
|
|
1006
|
+
| Black text | Light gray (not pure white) |
|
|
1007
|
+
| Colorful backgrounds | Desaturated, darker versions |
|
|
1008
|
+
|
|
1009
|
+
---
|
|
1010
|
+
|
|
1011
|
+
## 7. Accessibility Guidelines
|
|
1012
|
+
|
|
1013
|
+
### Contrast Requirements (WCAG)
|
|
1014
|
+
|
|
1015
|
+
| Level | Normal Text | Large Text |
|
|
1016
|
+
|-------|-------------|------------|
|
|
1017
|
+
| AA (minimum) | 4.5:1 | 3:1 |
|
|
1018
|
+
| AAA (enhanced) | 7:1 | 4.5:1 |
|
|
1019
|
+
|
|
1020
|
+
### How to Check Contrast
|
|
1021
|
+
|
|
1022
|
+
1. **Convert colors to luminance**
|
|
1023
|
+
2. **Calculate ratio**: (lighter + 0.05) / (darker + 0.05)
|
|
1024
|
+
3. **Adjust until ratio meets requirement**
|
|
1025
|
+
|
|
1026
|
+
### Safe Patterns
|
|
1027
|
+
|
|
1028
|
+
| Use Case | Guideline |
|
|
1029
|
+
|----------|-----------|
|
|
1030
|
+
| **Text on light bg** | Use lightness 35% or less |
|
|
1031
|
+
| **Text on dark bg** | Use lightness 85% or more |
|
|
1032
|
+
| **Primary on white** | Ensure dark enough variant |
|
|
1033
|
+
| **Buttons** | High contrast between bg and text |
|
|
1034
|
+
|
|
1035
|
+
---
|
|
1036
|
+
|
|
1037
|
+
## 8. Color Selection Checklist
|
|
1038
|
+
|
|
1039
|
+
Before finalizing any color choice, verify:
|
|
1040
|
+
|
|
1041
|
+
- [ ] **Asked user preference?** (if not specified)
|
|
1042
|
+
- [ ] **Matches project context?** (industry, audience)
|
|
1043
|
+
- [ ] **Follows 60-30-10?** (proper distribution)
|
|
1044
|
+
- [ ] **WCAG compliant?** (contrast checked)
|
|
1045
|
+
- [ ] **Works in both modes?** (if dark mode needed)
|
|
1046
|
+
- [ ] **NOT your default/favorite?** (variety check)
|
|
1047
|
+
- [ ] **Different from last project?** (avoid repetition)
|
|
1048
|
+
|
|
1049
|
+
---
|
|
1050
|
+
|
|
1051
|
+
## 9. Anti-Patterns to Avoid
|
|
1052
|
+
|
|
1053
|
+
### ❌ DON'T:
|
|
1054
|
+
- Copy the same hex codes every project
|
|
1055
|
+
- Default to purple/violet (AI tendency)
|
|
1056
|
+
- Default to dark mode + neon (AI tendency)
|
|
1057
|
+
- Use pure black (#000000) backgrounds
|
|
1058
|
+
- Use pure white (#FFFFFF) text on dark
|
|
1059
|
+
- Ignore user's industry context
|
|
1060
|
+
- Skip asking user preference
|
|
1061
|
+
|
|
1062
|
+
### ✅ DO:
|
|
1063
|
+
- Generate fresh palette per project
|
|
1064
|
+
- Ask user about color preferences
|
|
1065
|
+
- Consider industry and audience
|
|
1066
|
+
- Use HSL for flexible manipulation
|
|
1067
|
+
- Test contrast and accessibility
|
|
1068
|
+
- Offer light AND dark options
|
|
1069
|
+
|
|
1070
|
+
---
|
|
1071
|
+
|
|
1072
|
+
> **Remember**: Colors are decisions, not defaults. Every project deserves thoughtful selection based on its unique context.
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
---
|
|
1077
|
+
# Content from decision-trees.md
|
|
1078
|
+
|
|
1079
|
+
# Decision Trees & Context Templates
|
|
1080
|
+
|
|
1081
|
+
> Context-based design THINKING, not fixed solutions.
|
|
1082
|
+
> **These are decision GUIDES, not copy-paste templates.**
|
|
1083
|
+
> **For UX psychology principles (Hick's, Fitts', etc.) see:** [ux-psychology.md](ux-psychology.md)
|
|
1084
|
+
|
|
1085
|
+
---
|
|
1086
|
+
|
|
1087
|
+
## ⚠️ How to Use This File
|
|
1088
|
+
|
|
1089
|
+
This file helps you DECIDE, not copy.
|
|
1090
|
+
|
|
1091
|
+
- Decision trees → Help you THINK through options
|
|
1092
|
+
- Templates → Show STRUCTURE and PRINCIPLES, not exact values
|
|
1093
|
+
- **Always ask user preferences** before applying
|
|
1094
|
+
- **Generate fresh palettes** based on context, don't copy hex codes
|
|
1095
|
+
- **Apply UX laws** from ux-psychology.md to validate decisions
|
|
1096
|
+
|
|
1097
|
+
---
|
|
1098
|
+
|
|
1099
|
+
## 1. Master Decision Tree
|
|
1100
|
+
|
|
1101
|
+
```
|
|
1102
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
1103
|
+
│ WHAT ARE YOU BUILDING? │
|
|
1104
|
+
└─────────────────────────────────────────────────────────────┘
|
|
1105
|
+
│
|
|
1106
|
+
┌─────────────────────┼─────────────────────┐
|
|
1107
|
+
│ │ │
|
|
1108
|
+
▼ ▼ ▼
|
|
1109
|
+
E-COMMERCE SaaS/APP CONTENT
|
|
1110
|
+
- Product pages - Dashboard - Blog
|
|
1111
|
+
- Checkout - Tools - Portfolio
|
|
1112
|
+
- Catalog - Admin - Landing
|
|
1113
|
+
│ │ │
|
|
1114
|
+
▼ ▼ ▼
|
|
1115
|
+
PRINCIPLES: PRINCIPLES: PRINCIPLES:
|
|
1116
|
+
- Trust - Functionality - Storytelling
|
|
1117
|
+
- Action - Clarity - Emotion
|
|
1118
|
+
- Urgency - Efficiency - Creativity
|
|
1119
|
+
```
|
|
1120
|
+
|
|
1121
|
+
---
|
|
1122
|
+
|
|
1123
|
+
## 2. Audience Decision Tree
|
|
1124
|
+
|
|
1125
|
+
### Who is your target user?
|
|
1126
|
+
|
|
1127
|
+
```
|
|
1128
|
+
TARGET AUDIENCE
|
|
1129
|
+
│
|
|
1130
|
+
├── Gen Z (18-25)
|
|
1131
|
+
│ ├── Colors: Bold, vibrant, unexpected combinations
|
|
1132
|
+
│ ├── Type: Large, expressive, variable
|
|
1133
|
+
│ ├── Layout: Mobile-first, vertical, snackable
|
|
1134
|
+
│ ├── Effects: Motion, gamification, interactive
|
|
1135
|
+
│ └── Approach: Authentic, fast, no corporate feel
|
|
1136
|
+
│
|
|
1137
|
+
├── Millennials (26-41)
|
|
1138
|
+
│ ├── Colors: Muted, earthy, sophisticated
|
|
1139
|
+
│ ├── Type: Clean, readable, functional
|
|
1140
|
+
│ ├── Layout: Responsive, card-based, organized
|
|
1141
|
+
│ ├── Effects: Subtle, purposeful only
|
|
1142
|
+
│ └── Approach: Value-driven, transparent, sustainable
|
|
1143
|
+
│
|
|
1144
|
+
├── Gen X (42-57)
|
|
1145
|
+
│ ├── Colors: Professional, trusted, conservative
|
|
1146
|
+
│ ├── Type: Familiar, clear, no-nonsense
|
|
1147
|
+
│ ├── Layout: Traditional hierarchy, predictable
|
|
1148
|
+
│ ├── Effects: Minimal, functional feedback
|
|
1149
|
+
│ └── Approach: Direct, efficient, reliable
|
|
1150
|
+
│
|
|
1151
|
+
├── Boomers (58+)
|
|
1152
|
+
│ ├── Colors: High contrast, simple, clear
|
|
1153
|
+
│ ├── Type: Large sizes, high readability
|
|
1154
|
+
│ ├── Layout: Simple, linear, uncluttered
|
|
1155
|
+
│ ├── Effects: None or very minimal
|
|
1156
|
+
│ └── Approach: Clear, detailed, trustworthy
|
|
1157
|
+
│
|
|
1158
|
+
└── B2B / Enterprise
|
|
1159
|
+
├── Colors: Professional palette, muted
|
|
1160
|
+
├── Type: Clean, data-friendly, scannable
|
|
1161
|
+
├── Layout: Grid-based, organized, efficient
|
|
1162
|
+
├── Effects: Professional, subtle
|
|
1163
|
+
└── Approach: Expert, solution-focused, ROI-driven
|
|
1164
|
+
```
|
|
1165
|
+
|
|
1166
|
+
---
|
|
1167
|
+
|
|
1168
|
+
## 3. Color Selection Decision Tree
|
|
1169
|
+
|
|
1170
|
+
### Instead of fixed hex codes, use this process:
|
|
1171
|
+
|
|
1172
|
+
```
|
|
1173
|
+
WHAT EMOTION/ACTION DO YOU WANT?
|
|
1174
|
+
│
|
|
1175
|
+
├── Trust & Security
|
|
1176
|
+
│ └── Consider: Blue family, professional neutrals
|
|
1177
|
+
│ → ASK user for specific shade preference
|
|
1178
|
+
│
|
|
1179
|
+
├── Growth & Health
|
|
1180
|
+
│ └── Consider: Green family, natural tones
|
|
1181
|
+
│ → ASK user if eco/nature/wellness focus
|
|
1182
|
+
│
|
|
1183
|
+
├── Urgency & Action
|
|
1184
|
+
│ └── Consider: Warm colors (orange/red) as ACCENTS
|
|
1185
|
+
│ → Use sparingly, ASK if appropriate
|
|
1186
|
+
│
|
|
1187
|
+
├── Luxury & Premium
|
|
1188
|
+
│ └── Consider: Deep darks, metallics, restrained palette
|
|
1189
|
+
│ → ASK about brand positioning
|
|
1190
|
+
│
|
|
1191
|
+
├── Creative & Playful
|
|
1192
|
+
│ └── Consider: Multi-color, unexpected combinations
|
|
1193
|
+
│ → ASK about brand personality
|
|
1194
|
+
│
|
|
1195
|
+
└── Calm & Minimal
|
|
1196
|
+
└── Consider: Neutrals with single accent
|
|
1197
|
+
→ ASK what accent color fits brand
|
|
1198
|
+
```
|
|
1199
|
+
|
|
1200
|
+
### The Process:
|
|
1201
|
+
1. Identify the emotion needed
|
|
1202
|
+
2. Narrow to color FAMILY
|
|
1203
|
+
3. ASK user for preference within family
|
|
1204
|
+
4. Generate fresh palette using HSL principles
|
|
1205
|
+
|
|
1206
|
+
---
|
|
1207
|
+
|
|
1208
|
+
## 4. Typography Decision Tree
|
|
1209
|
+
|
|
1210
|
+
```
|
|
1211
|
+
WHAT'S THE CONTENT TYPE?
|
|
1212
|
+
│
|
|
1213
|
+
├── Data-Heavy (Dashboard, SaaS)
|
|
1214
|
+
│ ├── Style: Sans-serif, clear, compact
|
|
1215
|
+
│ ├── Scale: Tighter ratio (1.125-1.2)
|
|
1216
|
+
│ └── Priority: Scannability, density
|
|
1217
|
+
│
|
|
1218
|
+
├── Editorial (Blog, Magazine)
|
|
1219
|
+
│ ├── Style: Serif heading + Sans body works well
|
|
1220
|
+
│ ├── Scale: More dramatic (1.333+)
|
|
1221
|
+
│ └── Priority: Reading comfort, hierarchy
|
|
1222
|
+
│
|
|
1223
|
+
├── Modern Tech (Startup, SaaS Marketing)
|
|
1224
|
+
│ ├── Style: Geometric or humanist sans
|
|
1225
|
+
│ ├── Scale: Balanced (1.25)
|
|
1226
|
+
│ └── Priority: Modern feel, clarity
|
|
1227
|
+
│
|
|
1228
|
+
├── Luxury (Fashion, Premium)
|
|
1229
|
+
│ ├── Style: Elegant serif or thin sans
|
|
1230
|
+
│ ├── Scale: Dramatic (1.5-1.618)
|
|
1231
|
+
│ └── Priority: Sophistication, whitespace
|
|
1232
|
+
│
|
|
1233
|
+
└── Playful (Kids, Games, Casual)
|
|
1234
|
+
├── Style: Rounded, friendly fonts
|
|
1235
|
+
├── Scale: Varied, expressive
|
|
1236
|
+
└── Priority: Fun, approachable, readable
|
|
1237
|
+
```
|
|
1238
|
+
|
|
1239
|
+
### Selection Process:
|
|
1240
|
+
1. Identify content type
|
|
1241
|
+
2. Choose style DIRECTION
|
|
1242
|
+
3. ASK user if they have brand fonts
|
|
1243
|
+
4. Select fonts that match direction
|
|
1244
|
+
|
|
1245
|
+
---
|
|
1246
|
+
|
|
1247
|
+
## 5. E-commerce Guidelines {#e-commerce}
|
|
1248
|
+
|
|
1249
|
+
### Key Principles (Not Fixed Rules)
|
|
1250
|
+
- **Trust first:** How will you show security?
|
|
1251
|
+
- **Action-oriented:** Where are the CTAs?
|
|
1252
|
+
- **Scannable:** Can users compare quickly?
|
|
1253
|
+
|
|
1254
|
+
### Color Thinking:
|
|
1255
|
+
```
|
|
1256
|
+
E-commerce typically needs:
|
|
1257
|
+
├── Trust color (often blue family) → ASK preference
|
|
1258
|
+
├── Clean background (white/neutral) → depends on brand
|
|
1259
|
+
├── Action accent (for CTAs, sales) → depends on urgency level
|
|
1260
|
+
├── Success/error semantics → standard conventions work
|
|
1261
|
+
└── Brand integration → ASK about existing colors
|
|
1262
|
+
```
|
|
1263
|
+
|
|
1264
|
+
### Layout Principles:
|
|
1265
|
+
```
|
|
1266
|
+
┌────────────────────────────────────────────────────┐
|
|
1267
|
+
│ HEADER: Brand + Search + Cart │
|
|
1268
|
+
│ (Keep essential actions visible) │
|
|
1269
|
+
├────────────────────────────────────────────────────┤
|
|
1270
|
+
│ TRUST ZONE: Why trust this site? │
|
|
1271
|
+
│ (Shipping, returns, security - if applicable) │
|
|
1272
|
+
├────────────────────────────────────────────────────┤
|
|
1273
|
+
│ HERO: Primary message or offer │
|
|
1274
|
+
│ (Clear CTA, single focus) │
|
|
1275
|
+
├────────────────────────────────────────────────────┤
|
|
1276
|
+
│ CATEGORIES: Easy navigation │
|
|
1277
|
+
│ (Visual, filterable, scannable) │
|
|
1278
|
+
├────────────────────────────────────────────────────┤
|
|
1279
|
+
│ PRODUCTS: Easy comparison │
|
|
1280
|
+
│ (Price, rating, quick actions visible) │
|
|
1281
|
+
├────────────────────────────────────────────────────┤
|
|
1282
|
+
│ SOCIAL PROOF: Why others trust │
|
|
1283
|
+
│ (Reviews, testimonials - if available) │
|
|
1284
|
+
├────────────────────────────────────────────────────┤
|
|
1285
|
+
│ FOOTER: All the details │
|
|
1286
|
+
│ (Policies, contact, trust badges) │
|
|
1287
|
+
└────────────────────────────────────────────────────┘
|
|
1288
|
+
```
|
|
1289
|
+
|
|
1290
|
+
### Psychology to Apply:
|
|
1291
|
+
- Hick's Law: Limit navigation choices
|
|
1292
|
+
- Fitts' Law: Size CTAs appropriately
|
|
1293
|
+
- Social proof: Show where relevant
|
|
1294
|
+
- Scarcity: Use honestly if at all
|
|
1295
|
+
|
|
1296
|
+
---
|
|
1297
|
+
|
|
1298
|
+
## 6. SaaS Dashboard Guidelines {#saas}
|
|
1299
|
+
|
|
1300
|
+
### Key Principles
|
|
1301
|
+
- **Functional first:** Data clarity over decoration
|
|
1302
|
+
- **Calm UI:** Reduce cognitive load
|
|
1303
|
+
- **Consistent:** Predictable patterns
|
|
1304
|
+
|
|
1305
|
+
### Color Thinking:
|
|
1306
|
+
```
|
|
1307
|
+
Dashboard typically needs:
|
|
1308
|
+
├── Background: Light OR dark (ASK preference)
|
|
1309
|
+
├── Surface: Slight contrast from background
|
|
1310
|
+
├── Primary accent: For key actions
|
|
1311
|
+
├── Data colors: Success/warning/danger semantics
|
|
1312
|
+
└── Muted: For secondary information
|
|
1313
|
+
```
|
|
1314
|
+
|
|
1315
|
+
### Layout Principles:
|
|
1316
|
+
```
|
|
1317
|
+
Consider these patterns (not mandated):
|
|
1318
|
+
|
|
1319
|
+
OPTION A: Sidebar + Content
|
|
1320
|
+
├── Fixed sidebar for navigation
|
|
1321
|
+
└── Main area for content
|
|
1322
|
+
|
|
1323
|
+
OPTION B: Top nav + Content
|
|
1324
|
+
├── Horizontal navigation
|
|
1325
|
+
└── More horizontal content space
|
|
1326
|
+
|
|
1327
|
+
OPTION C: Collapsed + Expandable
|
|
1328
|
+
├── Icon-only sidebar expands
|
|
1329
|
+
└── Maximum content area
|
|
1330
|
+
|
|
1331
|
+
→ ASK user about their navigation preference
|
|
1332
|
+
```
|
|
1333
|
+
|
|
1334
|
+
### Psychology to Apply:
|
|
1335
|
+
- Hick's Law: Group navigation items
|
|
1336
|
+
- Miller's Law: Chunk information
|
|
1337
|
+
- Cognitive Load: Whitespace, consistency
|
|
1338
|
+
|
|
1339
|
+
---
|
|
1340
|
+
|
|
1341
|
+
## 7. Landing Page Guidelines {#landing-page}
|
|
1342
|
+
|
|
1343
|
+
### Key Principles
|
|
1344
|
+
- **Hero-centric:** First impression matters most
|
|
1345
|
+
- **Single focus:** One primary CTA
|
|
1346
|
+
- **Emotional:** Connect before selling
|
|
1347
|
+
|
|
1348
|
+
### Color Thinking:
|
|
1349
|
+
```
|
|
1350
|
+
Landing page typically needs:
|
|
1351
|
+
├── Brand primary: Hero background or accent
|
|
1352
|
+
├── Clean secondary: Most of page
|
|
1353
|
+
├── CTA color: Stands out from everything
|
|
1354
|
+
├── Supporting: For sections, testimonials
|
|
1355
|
+
└── ASK about brand colors first!
|
|
1356
|
+
```
|
|
1357
|
+
|
|
1358
|
+
### Structure Principles:
|
|
1359
|
+
```
|
|
1360
|
+
┌────────────────────────────────────────────────────┐
|
|
1361
|
+
│ Navigation: Minimal, CTA visible │
|
|
1362
|
+
├────────────────────────────────────────────────────┤
|
|
1363
|
+
│ HERO: Hook + Value + CTA │
|
|
1364
|
+
│ (Most important section, biggest impact) │
|
|
1365
|
+
├────────────────────────────────────────────────────┤
|
|
1366
|
+
│ PROBLEM: What pain do they have? │
|
|
1367
|
+
├────────────────────────────────────────────────────┤
|
|
1368
|
+
│ SOLUTION: How you solve it │
|
|
1369
|
+
├────────────────────────────────────────────────────┤
|
|
1370
|
+
│ PROOF: Why believe you? │
|
|
1371
|
+
│ (Testimonials, logos, stats) │
|
|
1372
|
+
├────────────────────────────────────────────────────┤
|
|
1373
|
+
│ HOW: Simple explanation of process │
|
|
1374
|
+
├────────────────────────────────────────────────────┤
|
|
1375
|
+
│ PRICING: If applicable │
|
|
1376
|
+
├────────────────────────────────────────────────────┤
|
|
1377
|
+
│ FAQ: Address objections │
|
|
1378
|
+
├────────────────────────────────────────────────────┤
|
|
1379
|
+
│ FINAL CTA: Repeat main action │
|
|
1380
|
+
└────────────────────────────────────────────────────┘
|
|
1381
|
+
```
|
|
1382
|
+
|
|
1383
|
+
### Psychology to Apply:
|
|
1384
|
+
- Visceral: Beautiful hero impression
|
|
1385
|
+
- Serial Position: Key info top/bottom
|
|
1386
|
+
- Social Proof: Testimonials work
|
|
1387
|
+
|
|
1388
|
+
---
|
|
1389
|
+
|
|
1390
|
+
## 8. Portfolio Guidelines {#portfolio}
|
|
1391
|
+
|
|
1392
|
+
### Key Principles
|
|
1393
|
+
- **Personality:** Show who you are
|
|
1394
|
+
- **Work-focused:** Let projects speak
|
|
1395
|
+
- **Memorable:** Stand out from templates
|
|
1396
|
+
|
|
1397
|
+
### Color Thinking:
|
|
1398
|
+
```
|
|
1399
|
+
Portfolio is personal - many options:
|
|
1400
|
+
├── Minimal: Neutrals + one signature accent
|
|
1401
|
+
├── Bold: Unexpected color choices
|
|
1402
|
+
├── Dark: Moody, artistic feel
|
|
1403
|
+
├── Light: Clean, professional feel
|
|
1404
|
+
└── ASK about personal brand identity!
|
|
1405
|
+
```
|
|
1406
|
+
|
|
1407
|
+
### Structure Principles:
|
|
1408
|
+
```
|
|
1409
|
+
┌────────────────────────────────────────────────────┐
|
|
1410
|
+
│ Navigation: Unique to your personality │
|
|
1411
|
+
├────────────────────────────────────────────────────┤
|
|
1412
|
+
│ INTRO: Who you are, what you do │
|
|
1413
|
+
│ (Make it memorable, not generic) │
|
|
1414
|
+
├────────────────────────────────────────────────────┤
|
|
1415
|
+
│ WORK: Featured projects │
|
|
1416
|
+
│ (Large, visual, interactive) │
|
|
1417
|
+
├────────────────────────────────────────────────────┤
|
|
1418
|
+
│ ABOUT: Personal story │
|
|
1419
|
+
│ (Creates connection) │
|
|
1420
|
+
├────────────────────────────────────────────────────┤
|
|
1421
|
+
│ CONTACT: Easy to reach │
|
|
1422
|
+
│ (Clear, direct) │
|
|
1423
|
+
└────────────────────────────────────────────────────┘
|
|
1424
|
+
```
|
|
1425
|
+
|
|
1426
|
+
### Psychology to Apply:
|
|
1427
|
+
- Von Restorff: Be uniquely memorable
|
|
1428
|
+
- Reflective: Personal story creates connection
|
|
1429
|
+
- Emotional: Personality over professionalism
|
|
1430
|
+
|
|
1431
|
+
---
|
|
1432
|
+
|
|
1433
|
+
## 9. Pre-Design Checklists
|
|
1434
|
+
|
|
1435
|
+
### Before Starting ANY Design
|
|
1436
|
+
|
|
1437
|
+
- [ ] **Audience defined?** (who exactly)
|
|
1438
|
+
- [ ] **Primary goal identified?** (what action)
|
|
1439
|
+
- [ ] **Constraints known?** (time, brand, tech)
|
|
1440
|
+
- [ ] **Content available?** (or placeholders needed)
|
|
1441
|
+
- [ ] **User preferences asked?** (colors, style, layout)
|
|
1442
|
+
|
|
1443
|
+
### Before Choosing Colors
|
|
1444
|
+
|
|
1445
|
+
- [ ] **Asked user preference?**
|
|
1446
|
+
- [ ] **Considered context?** (industry, emotion)
|
|
1447
|
+
- [ ] **Different from your default?**
|
|
1448
|
+
- [ ] **Checked accessibility?**
|
|
1449
|
+
|
|
1450
|
+
### Before Finalizing Layout
|
|
1451
|
+
|
|
1452
|
+
- [ ] **Hierarchy clear?**
|
|
1453
|
+
- [ ] **Primary CTA obvious?**
|
|
1454
|
+
- [ ] **Mobile considered?**
|
|
1455
|
+
- [ ] **Content fits structure?**
|
|
1456
|
+
|
|
1457
|
+
### Before Delivery
|
|
1458
|
+
|
|
1459
|
+
- [ ] **Looks premium, not generic?**
|
|
1460
|
+
- [ ] **Would you be proud of this?**
|
|
1461
|
+
- [ ] **Different from last project?**
|
|
1462
|
+
|
|
1463
|
+
---
|
|
1464
|
+
|
|
1465
|
+
## 10. Complexity Estimation
|
|
1466
|
+
|
|
1467
|
+
### Quick Projects (Hours)
|
|
1468
|
+
```
|
|
1469
|
+
Simple landing page
|
|
1470
|
+
Small portfolio
|
|
1471
|
+
Basic form
|
|
1472
|
+
Single component
|
|
1473
|
+
```
|
|
1474
|
+
→ Approach: Minimal decisions, focused execution
|
|
1475
|
+
|
|
1476
|
+
### Medium Projects (Days)
|
|
1477
|
+
```
|
|
1478
|
+
Multi-page site
|
|
1479
|
+
Dashboard with modules
|
|
1480
|
+
E-commerce category
|
|
1481
|
+
Complex forms
|
|
1482
|
+
```
|
|
1483
|
+
→ Approach: Establish tokens, custom components
|
|
1484
|
+
|
|
1485
|
+
### Large Projects (Weeks)
|
|
1486
|
+
```
|
|
1487
|
+
Full SaaS application
|
|
1488
|
+
E-commerce platform
|
|
1489
|
+
Custom design system
|
|
1490
|
+
Complex workflows
|
|
1491
|
+
```
|
|
1492
|
+
→ Approach: Full design system, documentation, testing
|
|
1493
|
+
|
|
1494
|
+
---
|
|
1495
|
+
|
|
1496
|
+
> **Remember**: These templates show STRUCTURE and THINKING process. Every project needs fresh color, typography, and styling decisions based on its unique context. ASK when unclear.
|
|
1497
|
+
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
---
|
|
1501
|
+
# Content from motion-graphics.md
|
|
1502
|
+
|
|
1503
|
+
# Motion Graphics Reference
|
|
1504
|
+
|
|
1505
|
+
> Advanced animation techniques for premium web experiences - Lottie, GSAP, SVG, 3D, Particles.
|
|
1506
|
+
> **Learn the principles, create WOW effects.**
|
|
1507
|
+
|
|
1508
|
+
---
|
|
1509
|
+
|
|
1510
|
+
## 1. Lottie Animations
|
|
1511
|
+
|
|
1512
|
+
### What is Lottie?
|
|
1513
|
+
|
|
1514
|
+
```
|
|
1515
|
+
JSON-based vector animations:
|
|
1516
|
+
├── Exported from After Effects via Bodymovin
|
|
1517
|
+
├── Lightweight (smaller than GIF/video)
|
|
1518
|
+
├── Scalable (vector-based, no pixelation)
|
|
1519
|
+
├── Interactive (control playback, segments)
|
|
1520
|
+
└── Cross-platform (web, iOS, Android, React Native)
|
|
1521
|
+
```
|
|
1522
|
+
|
|
1523
|
+
### When to Use Lottie
|
|
1524
|
+
|
|
1525
|
+
| Use Case | Why Lottie? |
|
|
1526
|
+
|----------|-------------|
|
|
1527
|
+
| **Loading animations** | Branded, smooth, lightweight |
|
|
1528
|
+
| **Empty states** | Engaging illustrations |
|
|
1529
|
+
| **Onboarding flows** | Complex multi-step animations |
|
|
1530
|
+
| **Success/Error feedback** | Delightful micro-interactions |
|
|
1531
|
+
| **Animated icons** | Consistent cross-platform |
|
|
1532
|
+
|
|
1533
|
+
### Principles
|
|
1534
|
+
|
|
1535
|
+
- Keep file size under 100KB for performance
|
|
1536
|
+
- Use loop sparingly (avoid distraction)
|
|
1537
|
+
- Provide static fallback for reduced-motion
|
|
1538
|
+
- Lazy load animation files when possible
|
|
1539
|
+
|
|
1540
|
+
### Sources
|
|
1541
|
+
|
|
1542
|
+
- LottieFiles.com (free library)
|
|
1543
|
+
- After Effects + Bodymovin (custom)
|
|
1544
|
+
- Figma plugins (export from design)
|
|
1545
|
+
|
|
1546
|
+
---
|
|
1547
|
+
|
|
1548
|
+
## 2. GSAP (GreenSock)
|
|
1549
|
+
|
|
1550
|
+
### What Makes GSAP Different
|
|
1551
|
+
|
|
1552
|
+
```
|
|
1553
|
+
Professional timeline-based animation:
|
|
1554
|
+
├── Precise control over sequences
|
|
1555
|
+
├── ScrollTrigger for scroll-driven animations
|
|
1556
|
+
├── MorphSVG for shape transitions
|
|
1557
|
+
├── Physics-based easing
|
|
1558
|
+
└── Works with any DOM element
|
|
1559
|
+
```
|
|
1560
|
+
|
|
1561
|
+
### Core Concepts
|
|
1562
|
+
|
|
1563
|
+
| Concept | Purpose |
|
|
1564
|
+
|---------|---------|
|
|
1565
|
+
| **Tween** | Single A→B animation |
|
|
1566
|
+
| **Timeline** | Sequenced/overlapping animations |
|
|
1567
|
+
| **ScrollTrigger** | Scroll position controls playback |
|
|
1568
|
+
| **Stagger** | Cascade effect across elements |
|
|
1569
|
+
|
|
1570
|
+
### When to Use GSAP
|
|
1571
|
+
|
|
1572
|
+
- ✅ Complex sequenced animations
|
|
1573
|
+
- ✅ Scroll-triggered reveals
|
|
1574
|
+
- ✅ Precise timing control needed
|
|
1575
|
+
- ✅ SVG morphing effects
|
|
1576
|
+
- ❌ Simple hover/focus effects (use CSS)
|
|
1577
|
+
- ❌ Performance-critical mobile (heavier)
|
|
1578
|
+
|
|
1579
|
+
### Principles
|
|
1580
|
+
|
|
1581
|
+
- Use timeline for orchestration (not individual tweens)
|
|
1582
|
+
- Stagger delay: 0.05-0.15s between items
|
|
1583
|
+
- ScrollTrigger: start at 70-80% viewport entry
|
|
1584
|
+
- Kill animations on unmount (prevent memory leaks)
|
|
1585
|
+
|
|
1586
|
+
---
|
|
1587
|
+
|
|
1588
|
+
## 3. SVG Animations
|
|
1589
|
+
|
|
1590
|
+
### Types of SVG Animation
|
|
1591
|
+
|
|
1592
|
+
| Type | Technique | Use Case |
|
|
1593
|
+
|------|-----------|----------|
|
|
1594
|
+
| **Line Drawing** | stroke-dashoffset | Logo reveals, signatures |
|
|
1595
|
+
| **Morph** | Path interpolation | Icon transitions |
|
|
1596
|
+
| **Transform** | rotate, scale, translate | Interactive icons |
|
|
1597
|
+
| **Color** | fill/stroke transition | State changes |
|
|
1598
|
+
|
|
1599
|
+
### Line Drawing Principles
|
|
1600
|
+
|
|
1601
|
+
```
|
|
1602
|
+
How stroke-dashoffset drawing works:
|
|
1603
|
+
├── Set dasharray to path length
|
|
1604
|
+
├── Set dashoffset equal to dasharray (hidden)
|
|
1605
|
+
├── Animate dashoffset to 0 (revealed)
|
|
1606
|
+
└── Create "drawing" effect
|
|
1607
|
+
```
|
|
1608
|
+
|
|
1609
|
+
### When to Use SVG Animations
|
|
1610
|
+
|
|
1611
|
+
- ✅ Logo reveals, brand moments
|
|
1612
|
+
- ✅ Icon state transitions (hamburger ↔ X)
|
|
1613
|
+
- ✅ Infographics, data visualization
|
|
1614
|
+
- ✅ Interactive illustrations
|
|
1615
|
+
- ❌ Photo-realistic content (use video)
|
|
1616
|
+
- ❌ Very complex scenes (performance)
|
|
1617
|
+
|
|
1618
|
+
### Principles
|
|
1619
|
+
|
|
1620
|
+
- Get path length dynamically for accuracy
|
|
1621
|
+
- Duration: 1-3s for full drawings
|
|
1622
|
+
- Easing: ease-out for natural feel
|
|
1623
|
+
- Simple fills complement, don't compete
|
|
1624
|
+
|
|
1625
|
+
---
|
|
1626
|
+
|
|
1627
|
+
## 4. 3D CSS Transforms
|
|
1628
|
+
|
|
1629
|
+
### Core Properties
|
|
1630
|
+
|
|
1631
|
+
```
|
|
1632
|
+
CSS 3D Space:
|
|
1633
|
+
├── perspective: depth of 3D field (500-1500px typical)
|
|
1634
|
+
├── transform-style: preserve-3d (enable children 3D)
|
|
1635
|
+
├── rotateX/Y/Z: rotation per axis
|
|
1636
|
+
├── translateZ: move toward/away from viewer
|
|
1637
|
+
└── backface-visibility: show/hide back side
|
|
1638
|
+
```
|
|
1639
|
+
|
|
1640
|
+
### Common 3D Patterns
|
|
1641
|
+
|
|
1642
|
+
| Pattern | Use Case |
|
|
1643
|
+
|---------|----------|
|
|
1644
|
+
| **Card flip** | Reveals, flashcards, product views |
|
|
1645
|
+
| **Tilt on hover** | Interactive cards, 3D depth |
|
|
1646
|
+
| **Parallax layers** | Hero sections, immersive scrolling |
|
|
1647
|
+
| **3D carousel** | Image galleries, sliders |
|
|
1648
|
+
|
|
1649
|
+
### Principles
|
|
1650
|
+
|
|
1651
|
+
- Perspective: 800-1200px for subtle, 400-600px for dramatic
|
|
1652
|
+
- Keep transforms simple (rotate + translate)
|
|
1653
|
+
- Ensure backface-visibility: hidden for flips
|
|
1654
|
+
- Test on Safari (different rendering)
|
|
1655
|
+
|
|
1656
|
+
---
|
|
1657
|
+
|
|
1658
|
+
## 5. Particle Effects
|
|
1659
|
+
|
|
1660
|
+
### Types of Particle Systems
|
|
1661
|
+
|
|
1662
|
+
| Type | Feel | Use Case |
|
|
1663
|
+
|------|------|----------|
|
|
1664
|
+
| **Geometric** | Tech, network | SaaS, tech sites |
|
|
1665
|
+
| **Confetti** | Celebration | Success moments |
|
|
1666
|
+
| **Snow/Rain** | Atmospheric | Seasonal, mood |
|
|
1667
|
+
| **Dust/Bokeh** | Dreamy | Photography, luxury |
|
|
1668
|
+
| **Fireflies** | Magical | Games, fantasy |
|
|
1669
|
+
|
|
1670
|
+
### Libraries
|
|
1671
|
+
|
|
1672
|
+
| Library | Best For |
|
|
1673
|
+
|---------|----------|
|
|
1674
|
+
| **tsParticles** | Configurable, lightweight |
|
|
1675
|
+
| **particles.js** | Simple backgrounds |
|
|
1676
|
+
| **Canvas API** | Custom, maximum control |
|
|
1677
|
+
| **Three.js** | Complex 3D particles |
|
|
1678
|
+
|
|
1679
|
+
### Principles
|
|
1680
|
+
|
|
1681
|
+
- Default: 30-50 particles (not overwhelming)
|
|
1682
|
+
- Movement: slow, organic (speed 0.5-2)
|
|
1683
|
+
- Opacity: 0.3-0.6 (don't compete with content)
|
|
1684
|
+
- Connections: subtle lines for "network" feel
|
|
1685
|
+
- ⚠️ Disable or reduce on mobile
|
|
1686
|
+
|
|
1687
|
+
### When to Use
|
|
1688
|
+
|
|
1689
|
+
- ✅ Hero backgrounds (atmospheric)
|
|
1690
|
+
- ✅ Success celebrations (confetti burst)
|
|
1691
|
+
- ✅ Tech visualization (connected nodes)
|
|
1692
|
+
- ❌ Content-heavy pages (distraction)
|
|
1693
|
+
- ❌ Low-powered devices (battery drain)
|
|
1694
|
+
|
|
1695
|
+
---
|
|
1696
|
+
|
|
1697
|
+
## 6. Scroll-Driven Animations
|
|
1698
|
+
|
|
1699
|
+
### Native CSS (Modern)
|
|
1700
|
+
|
|
1701
|
+
```
|
|
1702
|
+
CSS Scroll Timelines:
|
|
1703
|
+
├── animation-timeline: scroll() - document scroll
|
|
1704
|
+
├── animation-timeline: view() - element in viewport
|
|
1705
|
+
├── animation-range: entry/exit thresholds
|
|
1706
|
+
└── No JavaScript required
|
|
1707
|
+
```
|
|
1708
|
+
|
|
1709
|
+
### Principles
|
|
1710
|
+
|
|
1711
|
+
| Trigger Point | Use Case |
|
|
1712
|
+
|---------------|----------|
|
|
1713
|
+
| **Entry 0%** | When element starts entering |
|
|
1714
|
+
| **Entry 50%** | When half visible |
|
|
1715
|
+
| **Cover 50%** | When centered in viewport |
|
|
1716
|
+
| **Exit 100%** | When fully exited |
|
|
1717
|
+
|
|
1718
|
+
### Best Practices
|
|
1719
|
+
|
|
1720
|
+
- Reveal animations: start at ~25% entry
|
|
1721
|
+
- Parallax: continuous scroll progress
|
|
1722
|
+
- Sticky elements: use cover range
|
|
1723
|
+
- Always test scroll performance
|
|
1724
|
+
|
|
1725
|
+
---
|
|
1726
|
+
|
|
1727
|
+
## 7. Performance Principles
|
|
1728
|
+
|
|
1729
|
+
### GPU vs CPU Animation
|
|
1730
|
+
|
|
1731
|
+
```
|
|
1732
|
+
CHEAP (GPU-accelerated):
|
|
1733
|
+
├── transform (translate, scale, rotate)
|
|
1734
|
+
├── opacity
|
|
1735
|
+
└── filter (use sparingly)
|
|
1736
|
+
|
|
1737
|
+
EXPENSIVE (triggers reflow):
|
|
1738
|
+
├── width, height
|
|
1739
|
+
├── top, left, right, bottom
|
|
1740
|
+
├── padding, margin
|
|
1741
|
+
└── complex box-shadow
|
|
1742
|
+
```
|
|
1743
|
+
|
|
1744
|
+
### Optimization Checklist
|
|
1745
|
+
|
|
1746
|
+
- [ ] Animate only transform/opacity
|
|
1747
|
+
- [ ] Use `will-change` before heavy animations (remove after)
|
|
1748
|
+
- [ ] Test on low-end devices
|
|
1749
|
+
- [ ] Implement `prefers-reduced-motion`
|
|
1750
|
+
- [ ] Lazy load animation libraries
|
|
1751
|
+
- [ ] Throttle scroll-based calculations
|
|
1752
|
+
|
|
1753
|
+
---
|
|
1754
|
+
|
|
1755
|
+
## 8. Motion Graphics Decision Tree
|
|
1756
|
+
|
|
1757
|
+
```
|
|
1758
|
+
What animation do you need?
|
|
1759
|
+
│
|
|
1760
|
+
├── Complex branded animation?
|
|
1761
|
+
│ └── Lottie (After Effects export)
|
|
1762
|
+
│
|
|
1763
|
+
├── Sequenced scroll-triggered?
|
|
1764
|
+
│ └── GSAP + ScrollTrigger
|
|
1765
|
+
│
|
|
1766
|
+
├── Logo/icon animation?
|
|
1767
|
+
│ └── SVG animation (stroke or morph)
|
|
1768
|
+
│
|
|
1769
|
+
├── Interactive 3D effect?
|
|
1770
|
+
│ └── CSS 3D Transforms (simple) or Three.js (complex)
|
|
1771
|
+
│
|
|
1772
|
+
├── Atmospheric background?
|
|
1773
|
+
│ └── tsParticles or Canvas
|
|
1774
|
+
│
|
|
1775
|
+
└── Simple entrance/hover?
|
|
1776
|
+
└── CSS @keyframes or Framer Motion
|
|
1777
|
+
```
|
|
1778
|
+
|
|
1779
|
+
---
|
|
1780
|
+
|
|
1781
|
+
## 9. Anti-Patterns
|
|
1782
|
+
|
|
1783
|
+
| ❌ Don't | ✅ Do |
|
|
1784
|
+
|----------|-------|
|
|
1785
|
+
| Animate everything at once | Stagger and sequence |
|
|
1786
|
+
| Use heavy libraries for simple effects | Start with CSS |
|
|
1787
|
+
| Ignore reduced-motion | Always provide fallback |
|
|
1788
|
+
| Block main thread | Optimize for 60fps |
|
|
1789
|
+
| Same particles every project | Match brand/context |
|
|
1790
|
+
| Complex effects on mobile | Feature detection |
|
|
1791
|
+
|
|
1792
|
+
---
|
|
1793
|
+
|
|
1794
|
+
## 10. Quick Reference
|
|
1795
|
+
|
|
1796
|
+
| Effect | Tool | Performance |
|
|
1797
|
+
|--------|------|-------------|
|
|
1798
|
+
| Loading spinner | CSS/Lottie | Light |
|
|
1799
|
+
| Staggered reveal | GSAP/Framer | Medium |
|
|
1800
|
+
| SVG path draw | CSS stroke | Light |
|
|
1801
|
+
| 3D card flip | CSS transforms | Light |
|
|
1802
|
+
| Particle background | tsParticles | Heavy |
|
|
1803
|
+
| Scroll parallax | GSAP ScrollTrigger | Medium |
|
|
1804
|
+
| Shape morphing | GSAP MorphSVG | Medium |
|
|
1805
|
+
|
|
1806
|
+
---
|
|
1807
|
+
|
|
1808
|
+
> **Remember**: Motion graphics should enhance, not distract. Every animation must serve a PURPOSE—feedback, guidance, delight, or storytelling.
|
|
1809
|
+
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
---
|
|
1813
|
+
# Content from typography-system.md
|
|
1814
|
+
|
|
1815
|
+
# Typography System Reference
|
|
1816
|
+
|
|
1817
|
+
> Typography principles and decision-making - learn to think, not memorize.
|
|
1818
|
+
> **No fixed font names or sizes - understand the system.**
|
|
1819
|
+
|
|
1820
|
+
---
|
|
1821
|
+
|
|
1822
|
+
## 1. Modular Scale Principles
|
|
1823
|
+
|
|
1824
|
+
### What is a Modular Scale?
|
|
1825
|
+
|
|
1826
|
+
```
|
|
1827
|
+
A mathematical relationship between font sizes:
|
|
1828
|
+
├── Pick a BASE size (usually body text)
|
|
1829
|
+
├── Pick a RATIO (multiplier)
|
|
1830
|
+
└── Generate all sizes using: base × ratio^n
|
|
1831
|
+
```
|
|
1832
|
+
|
|
1833
|
+
### Common Ratios and When to Use
|
|
1834
|
+
|
|
1835
|
+
| Ratio | Value | Feeling | Best For |
|
|
1836
|
+
|-------|-------|---------|----------|
|
|
1837
|
+
| Minor Second | 1.067 | Very subtle | Dense UI, small screens |
|
|
1838
|
+
| Major Second | 1.125 | Subtle | Compact interfaces |
|
|
1839
|
+
| Minor Third | 1.2 | Comfortable | Mobile apps, cards |
|
|
1840
|
+
| Major Third | 1.25 | Balanced | General web (most common) |
|
|
1841
|
+
| Perfect Fourth | 1.333 | Noticeable | Editorial, blogs |
|
|
1842
|
+
| Perfect Fifth | 1.5 | Dramatic | Headlines, marketing |
|
|
1843
|
+
| Golden Ratio | 1.618 | Maximum impact | Hero sections, display |
|
|
1844
|
+
|
|
1845
|
+
### Generate Your Scale
|
|
1846
|
+
|
|
1847
|
+
```
|
|
1848
|
+
Given: base = YOUR_BASE_SIZE, ratio = YOUR_RATIO
|
|
1849
|
+
|
|
1850
|
+
Scale:
|
|
1851
|
+
├── xs: base ÷ ratio²
|
|
1852
|
+
├── sm: base ÷ ratio
|
|
1853
|
+
├── base: YOUR_BASE_SIZE
|
|
1854
|
+
├── lg: base × ratio
|
|
1855
|
+
├── xl: base × ratio²
|
|
1856
|
+
├── 2xl: base × ratio³
|
|
1857
|
+
├── 3xl: base × ratio⁴
|
|
1858
|
+
└── ... continue as needed
|
|
1859
|
+
```
|
|
1860
|
+
|
|
1861
|
+
### Choosing Base Size
|
|
1862
|
+
|
|
1863
|
+
| Context | Base Size Range | Why |
|
|
1864
|
+
|---------|-----------------|-----|
|
|
1865
|
+
| Mobile-first | 16-18px | Readability on small screens |
|
|
1866
|
+
| Desktop app | 14-16px | Information density |
|
|
1867
|
+
| Editorial | 18-21px | Long-form reading comfort |
|
|
1868
|
+
| Accessibility focus | 18px+ | Easier to read |
|
|
1869
|
+
|
|
1870
|
+
---
|
|
1871
|
+
|
|
1872
|
+
## 2. Font Pairing Principles
|
|
1873
|
+
|
|
1874
|
+
### What Makes Fonts Work Together
|
|
1875
|
+
|
|
1876
|
+
```
|
|
1877
|
+
Contrast + Harmony:
|
|
1878
|
+
├── Different ENOUGH to create hierarchy
|
|
1879
|
+
├── Similar ENOUGH to feel cohesive
|
|
1880
|
+
└── Usually: serif + sans, or display + neutral
|
|
1881
|
+
```
|
|
1882
|
+
|
|
1883
|
+
### Pairing Strategies
|
|
1884
|
+
|
|
1885
|
+
| Strategy | How | Result |
|
|
1886
|
+
|----------|-----|--------|
|
|
1887
|
+
| **Contrast** | Serif heading + Sans body | Classic, editorial feel |
|
|
1888
|
+
| **Same Family** | One variable font, different weights | Cohesive, modern |
|
|
1889
|
+
| **Same Designer** | Fonts by same foundry | Often harmonious proportions |
|
|
1890
|
+
| **Era Match** | Fonts from same time period | Historical consistency |
|
|
1891
|
+
|
|
1892
|
+
### What to Look For
|
|
1893
|
+
|
|
1894
|
+
```
|
|
1895
|
+
When pairing, compare:
|
|
1896
|
+
├── x-height (height of lowercase letters)
|
|
1897
|
+
├── Letter width (narrow vs wide)
|
|
1898
|
+
├── Stroke contrast (thin/thick variation)
|
|
1899
|
+
└── Overall mood (formal vs casual)
|
|
1900
|
+
```
|
|
1901
|
+
|
|
1902
|
+
### Safe Pairing Patterns
|
|
1903
|
+
|
|
1904
|
+
| Heading Style | Body Style | Mood |
|
|
1905
|
+
|---------------|------------|------|
|
|
1906
|
+
| Geometric sans | Humanist sans | Modern, friendly |
|
|
1907
|
+
| Display serif | Clean sans | Editorial, sophisticated |
|
|
1908
|
+
| Neutral sans | Same sans | Minimal, tech |
|
|
1909
|
+
| Bold geometric | Light geometric | Contemporary |
|
|
1910
|
+
|
|
1911
|
+
### Avoid
|
|
1912
|
+
|
|
1913
|
+
- ❌ Two decorative fonts together
|
|
1914
|
+
- ❌ Similar fonts that conflict
|
|
1915
|
+
- ❌ More than 2-3 font families
|
|
1916
|
+
- ❌ Fonts with very different x-heights
|
|
1917
|
+
|
|
1918
|
+
---
|
|
1919
|
+
|
|
1920
|
+
## 3. Line Height Principles
|
|
1921
|
+
|
|
1922
|
+
### The Relationship
|
|
1923
|
+
|
|
1924
|
+
```
|
|
1925
|
+
Line height depends on:
|
|
1926
|
+
├── Font size (larger text = less line height needed)
|
|
1927
|
+
├── Line length (longer lines = more line height)
|
|
1928
|
+
├── Font design (some fonts need more space)
|
|
1929
|
+
└── Content type (headings vs body)
|
|
1930
|
+
```
|
|
1931
|
+
|
|
1932
|
+
### Guidelines by Context
|
|
1933
|
+
|
|
1934
|
+
| Content Type | Line Height Range | Why |
|
|
1935
|
+
|--------------|-------------------|-----|
|
|
1936
|
+
| **Headings** | 1.1 - 1.3 | Short lines, want compact |
|
|
1937
|
+
| **Body text** | 1.4 - 1.6 | Comfortable reading |
|
|
1938
|
+
| **Long-form** | 1.6 - 1.8 | Maximum readability |
|
|
1939
|
+
| **UI elements** | 1.2 - 1.4 | Space efficiency |
|
|
1940
|
+
|
|
1941
|
+
### Adjustment Factors
|
|
1942
|
+
|
|
1943
|
+
- **Longer line length** → Increase line height
|
|
1944
|
+
- **Larger font size** → Decrease line height ratio
|
|
1945
|
+
- **All caps** → May need more line height
|
|
1946
|
+
- **Tight tracking** → May need more line height
|
|
1947
|
+
|
|
1948
|
+
---
|
|
1949
|
+
|
|
1950
|
+
## 4. Line Length Principles
|
|
1951
|
+
|
|
1952
|
+
### Optimal Reading Width
|
|
1953
|
+
|
|
1954
|
+
```
|
|
1955
|
+
The sweet spot: 45-75 characters per line
|
|
1956
|
+
├── < 45: Too choppy, breaks flow
|
|
1957
|
+
├── 45-75: Comfortable reading
|
|
1958
|
+
├── > 75: Eye tracking strain
|
|
1959
|
+
```
|
|
1960
|
+
|
|
1961
|
+
### How to Measure
|
|
1962
|
+
|
|
1963
|
+
```css
|
|
1964
|
+
/* Character-based (recommended) */
|
|
1965
|
+
max-width: 65ch; /* ch = width of "0" character */
|
|
1966
|
+
|
|
1967
|
+
/* This adapts to font size automatically */
|
|
1968
|
+
```
|
|
1969
|
+
|
|
1970
|
+
### Context Adjustments
|
|
1971
|
+
|
|
1972
|
+
| Context | Character Range |
|
|
1973
|
+
|---------|-----------------|
|
|
1974
|
+
| Desktop article | 60-75 characters |
|
|
1975
|
+
| Mobile | 35-50 characters |
|
|
1976
|
+
| Sidebar text | 30-45 characters |
|
|
1977
|
+
| Wide monitors | Still cap at ~75ch |
|
|
1978
|
+
|
|
1979
|
+
---
|
|
1980
|
+
|
|
1981
|
+
## 5. Responsive Typography Principles
|
|
1982
|
+
|
|
1983
|
+
### The Problem
|
|
1984
|
+
|
|
1985
|
+
```
|
|
1986
|
+
Fixed sizes don't scale well:
|
|
1987
|
+
├── Desktop size too big on mobile
|
|
1988
|
+
├── Mobile size too small on desktop
|
|
1989
|
+
└── Breakpoint jumps feel jarring
|
|
1990
|
+
```
|
|
1991
|
+
|
|
1992
|
+
### Fluid Typography (clamp)
|
|
1993
|
+
|
|
1994
|
+
```css
|
|
1995
|
+
/* Syntax: clamp(MIN, PREFERRED, MAX) */
|
|
1996
|
+
font-size: clamp(
|
|
1997
|
+
MINIMUM_SIZE,
|
|
1998
|
+
FLUID_CALCULATION,
|
|
1999
|
+
MAXIMUM_SIZE
|
|
2000
|
+
);
|
|
2001
|
+
|
|
2002
|
+
/* FLUID_CALCULATION typically:
|
|
2003
|
+
base + viewport-relative-unit */
|
|
2004
|
+
```
|
|
2005
|
+
|
|
2006
|
+
### Scaling Strategy
|
|
2007
|
+
|
|
2008
|
+
| Element | Scaling Behavior |
|
|
2009
|
+
|---------|-----------------|
|
|
2010
|
+
| Body text | Slight scaling (1rem → 1.125rem) |
|
|
2011
|
+
| Subheadings | Moderate scaling |
|
|
2012
|
+
| Headings | More dramatic scaling |
|
|
2013
|
+
| Display text | Most dramatic scaling |
|
|
2014
|
+
|
|
2015
|
+
---
|
|
2016
|
+
|
|
2017
|
+
## 6. Weight and Emphasis Principles
|
|
2018
|
+
|
|
2019
|
+
### Semantic Weight Usage
|
|
2020
|
+
|
|
2021
|
+
| Weight Range | Name | Use For |
|
|
2022
|
+
|--------------|------|---------|
|
|
2023
|
+
| 300-400 | Light/Normal | Body text, paragraphs |
|
|
2024
|
+
| 500 | Medium | Subtle emphasis |
|
|
2025
|
+
| 600 | Semibold | Subheadings, labels |
|
|
2026
|
+
| 700 | Bold | Headings, strong emphasis |
|
|
2027
|
+
| 800-900 | Heavy/Black | Display, hero text |
|
|
2028
|
+
|
|
2029
|
+
### Creating Contrast
|
|
2030
|
+
|
|
2031
|
+
```
|
|
2032
|
+
Good contrast = skip at least 2 weight levels
|
|
2033
|
+
├── 400 body + 700 heading = good
|
|
2034
|
+
├── 400 body + 500 emphasis = subtle
|
|
2035
|
+
├── 600 heading + 700 subheading = too similar
|
|
2036
|
+
```
|
|
2037
|
+
|
|
2038
|
+
### Avoid
|
|
2039
|
+
|
|
2040
|
+
- ❌ Too many weights (max 3-4 per page)
|
|
2041
|
+
- ❌ Adjacent weights for hierarchy (400/500)
|
|
2042
|
+
- ❌ Heavy weights for long text
|
|
2043
|
+
|
|
2044
|
+
---
|
|
2045
|
+
|
|
2046
|
+
## 7. Letter Spacing (Tracking)
|
|
2047
|
+
|
|
2048
|
+
### Principles
|
|
2049
|
+
|
|
2050
|
+
```
|
|
2051
|
+
Large text (headings): tighter tracking
|
|
2052
|
+
├── Letters are big, gaps feel larger
|
|
2053
|
+
└── Slight negative tracking looks better
|
|
2054
|
+
|
|
2055
|
+
Small text (body): normal or slightly wider
|
|
2056
|
+
├── Improves readability at small sizes
|
|
2057
|
+
└── Never negative for body text
|
|
2058
|
+
|
|
2059
|
+
ALL CAPS: always wider tracking
|
|
2060
|
+
├── Uppercase lacks ascenders/descenders
|
|
2061
|
+
└── Needs more space to feel right
|
|
2062
|
+
```
|
|
2063
|
+
|
|
2064
|
+
### Adjustment Guidelines
|
|
2065
|
+
|
|
2066
|
+
| Context | Tracking Adjustment |
|
|
2067
|
+
|---------|---------------------|
|
|
2068
|
+
| Display/Hero | -2% to -4% |
|
|
2069
|
+
| Headings | -1% to -2% |
|
|
2070
|
+
| Body text | 0% (normal) |
|
|
2071
|
+
| Small text | +1% to +2% |
|
|
2072
|
+
| ALL CAPS | +5% to +10% |
|
|
2073
|
+
|
|
2074
|
+
---
|
|
2075
|
+
|
|
2076
|
+
## 8. Hierarchy Principles
|
|
2077
|
+
|
|
2078
|
+
### Visual Hierarchy Through Type
|
|
2079
|
+
|
|
2080
|
+
```
|
|
2081
|
+
Ways to create hierarchy:
|
|
2082
|
+
├── SIZE (most obvious)
|
|
2083
|
+
├── WEIGHT (bold stands out)
|
|
2084
|
+
├── COLOR (contrast levels)
|
|
2085
|
+
├── SPACING (margins separate sections)
|
|
2086
|
+
└── POSITION (top = important)
|
|
2087
|
+
```
|
|
2088
|
+
|
|
2089
|
+
### Typical Hierarchy
|
|
2090
|
+
|
|
2091
|
+
| Level | Characteristics |
|
|
2092
|
+
|-------|-----------------|
|
|
2093
|
+
| Primary (H1) | Largest, boldest, most distinct |
|
|
2094
|
+
| Secondary (H2) | Noticeably smaller but still bold |
|
|
2095
|
+
| Tertiary (H3) | Medium size, may use weight only |
|
|
2096
|
+
| Body | Standard size and weight |
|
|
2097
|
+
| Caption/Meta | Smaller, often lighter color |
|
|
2098
|
+
|
|
2099
|
+
### Testing Hierarchy
|
|
2100
|
+
|
|
2101
|
+
Ask: "Can I tell what's most important at a glance?"
|
|
2102
|
+
|
|
2103
|
+
If squinting at the page, the hierarchy should still be clear.
|
|
2104
|
+
|
|
2105
|
+
---
|
|
2106
|
+
|
|
2107
|
+
## 9. Readability Psychology
|
|
2108
|
+
|
|
2109
|
+
### F-Pattern Reading
|
|
2110
|
+
|
|
2111
|
+
```
|
|
2112
|
+
Users scan in F-pattern:
|
|
2113
|
+
├── Across the top (first line)
|
|
2114
|
+
├── Down the left side
|
|
2115
|
+
├── Across again (subheading)
|
|
2116
|
+
└── Continue down left
|
|
2117
|
+
```
|
|
2118
|
+
|
|
2119
|
+
**Implication**: Key info on left and in headings
|
|
2120
|
+
|
|
2121
|
+
### Chunking for Comprehension
|
|
2122
|
+
|
|
2123
|
+
- Short paragraphs (3-4 lines max)
|
|
2124
|
+
- Clear subheadings
|
|
2125
|
+
- Bullet points for lists
|
|
2126
|
+
- White space between sections
|
|
2127
|
+
|
|
2128
|
+
### Cognitive Ease
|
|
2129
|
+
|
|
2130
|
+
- Familiar fonts = easier reading
|
|
2131
|
+
- High contrast = less strain
|
|
2132
|
+
- Consistent patterns = predictable
|
|
2133
|
+
|
|
2134
|
+
---
|
|
2135
|
+
|
|
2136
|
+
## 10. Typography Selection Checklist
|
|
2137
|
+
|
|
2138
|
+
Before finalizing typography:
|
|
2139
|
+
|
|
2140
|
+
- [ ] **Asked user for font preferences?**
|
|
2141
|
+
- [ ] **Considered brand/context?**
|
|
2142
|
+
- [ ] **Selected appropriate scale ratio?**
|
|
2143
|
+
- [ ] **Limited to 2-3 font families?**
|
|
2144
|
+
- [ ] **Tested readability at all sizes?**
|
|
2145
|
+
- [ ] **Checked line length (45-75ch)?**
|
|
2146
|
+
- [ ] **Verified contrast for accessibility?**
|
|
2147
|
+
- [ ] **Different from your last project?**
|
|
2148
|
+
|
|
2149
|
+
### Anti-Patterns
|
|
2150
|
+
|
|
2151
|
+
- ❌ Same fonts every project
|
|
2152
|
+
- ❌ Too many font families
|
|
2153
|
+
- ❌ Ignoring readability for style
|
|
2154
|
+
- ❌ Fixed sizes without responsiveness
|
|
2155
|
+
- ❌ Decorative fonts for body text
|
|
2156
|
+
|
|
2157
|
+
---
|
|
2158
|
+
|
|
2159
|
+
> **Remember**: Typography is about communication clarity. Choose based on content needs and audience, not personal preference.
|
|
2160
|
+
|
|
2161
|
+
|
|
2162
|
+
|
|
2163
|
+
---
|
|
2164
|
+
# Content from ux-psychology.md
|
|
2165
|
+
|
|
2166
|
+
# UX Psychology Reference
|
|
2167
|
+
|
|
2168
|
+
> Deep dive into UX laws, emotional design, trust building, and behavioral psychology.
|
|
2169
|
+
|
|
2170
|
+
---
|
|
2171
|
+
|
|
2172
|
+
## 1. Core UX Laws
|
|
2173
|
+
|
|
2174
|
+
### Hick's Law
|
|
2175
|
+
|
|
2176
|
+
**Principle:** The time to make a decision increases logarithmically with the number of choices.
|
|
2177
|
+
|
|
2178
|
+
```
|
|
2179
|
+
Decision Time = a + b × log₂(n + 1)
|
|
2180
|
+
Where n = number of choices
|
|
2181
|
+
```
|
|
2182
|
+
|
|
2183
|
+
**Application:**
|
|
2184
|
+
- Navigation: Max 5-7 top-level items
|
|
2185
|
+
- Forms: Break into steps (progressive disclosure)
|
|
2186
|
+
- Options: Default selections when possible
|
|
2187
|
+
- Filters: Prioritize most-used, hide advanced
|
|
2188
|
+
|
|
2189
|
+
**Example:**
|
|
2190
|
+
```
|
|
2191
|
+
❌ Bad: 15 menu items in one nav
|
|
2192
|
+
✅ Good: 5 main categories + "More"
|
|
2193
|
+
|
|
2194
|
+
❌ Bad: 20 form fields at once
|
|
2195
|
+
✅ Good: 3-step wizard with 5-7 fields each
|
|
2196
|
+
```
|
|
2197
|
+
|
|
2198
|
+
---
|
|
2199
|
+
|
|
2200
|
+
### Fitts' Law
|
|
2201
|
+
|
|
2202
|
+
**Principle:** Time to reach a target = function of distance and size.
|
|
2203
|
+
|
|
2204
|
+
```
|
|
2205
|
+
MT = a + b × log₂(1 + D/W)
|
|
2206
|
+
Where D = distance, W = width
|
|
2207
|
+
```
|
|
2208
|
+
|
|
2209
|
+
**Application:**
|
|
2210
|
+
- CTAs: Make primary buttons larger (min 44px height)
|
|
2211
|
+
- Touch targets: 44×44px minimum on mobile
|
|
2212
|
+
- Placement: Important actions near natural cursor position
|
|
2213
|
+
- Corners: "Magic corners" (infinite edge = easy to hit)
|
|
2214
|
+
|
|
2215
|
+
**Button Sizing:**
|
|
2216
|
+
```css
|
|
2217
|
+
/* Size by importance */
|
|
2218
|
+
.btn-primary { height: 48px; padding: 0 24px; }
|
|
2219
|
+
.btn-secondary { height: 40px; padding: 0 16px; }
|
|
2220
|
+
.btn-tertiary { height: 36px; padding: 0 12px; }
|
|
2221
|
+
|
|
2222
|
+
/* Mobile touch targets */
|
|
2223
|
+
@media (hover: none) {
|
|
2224
|
+
.btn { min-height: 44px; min-width: 44px; }
|
|
2225
|
+
}
|
|
2226
|
+
```
|
|
2227
|
+
|
|
2228
|
+
---
|
|
2229
|
+
|
|
2230
|
+
### Miller's Law
|
|
2231
|
+
|
|
2232
|
+
**Principle:** Average person can hold 7±2 chunks in working memory.
|
|
2233
|
+
|
|
2234
|
+
**Application:**
|
|
2235
|
+
- Lists: Group into chunks of 5-7 items
|
|
2236
|
+
- Navigation: Max 7 menu items
|
|
2237
|
+
- Content: Break long content with headings
|
|
2238
|
+
- Phone numbers: 555-123-4567 (chunked)
|
|
2239
|
+
|
|
2240
|
+
**Chunking Example:**
|
|
2241
|
+
```
|
|
2242
|
+
❌ 5551234567
|
|
2243
|
+
✅ 555-123-4567
|
|
2244
|
+
|
|
2245
|
+
❌ Long paragraph of text without breaks
|
|
2246
|
+
✅ Short paragraphs
|
|
2247
|
+
With bullet points
|
|
2248
|
+
And subheadings
|
|
2249
|
+
```
|
|
2250
|
+
|
|
2251
|
+
---
|
|
2252
|
+
|
|
2253
|
+
### Von Restorff Effect (Isolation Effect)
|
|
2254
|
+
|
|
2255
|
+
**Principle:** An item that stands out is more likely to be remembered.
|
|
2256
|
+
|
|
2257
|
+
**Application:**
|
|
2258
|
+
- CTA buttons: Distinct color from other elements
|
|
2259
|
+
- Pricing: Highlight recommended plan
|
|
2260
|
+
- Important info: Visual differentiation
|
|
2261
|
+
- New features: Badge or callout
|
|
2262
|
+
|
|
2263
|
+
**Example:**
|
|
2264
|
+
```css
|
|
2265
|
+
/* All buttons gray, primary stands out */
|
|
2266
|
+
.btn { background: #E5E7EB; }
|
|
2267
|
+
.btn-primary { background: #3B82F6; }
|
|
2268
|
+
|
|
2269
|
+
/* Recommended plan highlighted */
|
|
2270
|
+
.pricing-card { border: 1px solid #E5E7EB; }
|
|
2271
|
+
.pricing-card.popular {
|
|
2272
|
+
border: 2px solid #3B82F6;
|
|
2273
|
+
box-shadow: var(--shadow-lg);
|
|
2274
|
+
}
|
|
2275
|
+
```
|
|
2276
|
+
|
|
2277
|
+
---
|
|
2278
|
+
|
|
2279
|
+
### Serial Position Effect
|
|
2280
|
+
|
|
2281
|
+
**Principle:** Items at the beginning (primacy) and end (recency) of a list are remembered best.
|
|
2282
|
+
|
|
2283
|
+
**Application:**
|
|
2284
|
+
- Navigation: Most important items first and last
|
|
2285
|
+
- Lists: Key info at top and bottom
|
|
2286
|
+
- Forms: Most critical fields at start
|
|
2287
|
+
- CTAs: Repeat at top and bottom of long pages
|
|
2288
|
+
|
|
2289
|
+
**Example:**
|
|
2290
|
+
```
|
|
2291
|
+
Navigation: Home | [key items] | Contact
|
|
2292
|
+
|
|
2293
|
+
Long landing page:
|
|
2294
|
+
- CTA at hero (top)
|
|
2295
|
+
- Content sections
|
|
2296
|
+
- CTA repeated at bottom
|
|
2297
|
+
```
|
|
2298
|
+
|
|
2299
|
+
### Jakob’s Law
|
|
2300
|
+
|
|
2301
|
+
**Principle:** Users spend most of their time on other sites. They prefer your site to work the same way as all the other sites they already know.
|
|
2302
|
+
|
|
2303
|
+
**Application:**
|
|
2304
|
+
- **Patterns:** Use standard placement for search bars and carts.
|
|
2305
|
+
- **Mental Models:** Leverage familiar icons (e.g., a magnifying glass).
|
|
2306
|
+
- **Vocabulary:** Use "Log In" instead of "Enter the Portal."
|
|
2307
|
+
- **Layout:** Keep the logo in the top-left for "Home" navigation.
|
|
2308
|
+
- **Interaction:** Swiping right to go back/next should feel native.
|
|
2309
|
+
- **Feedback:** Standard colors (Red = Error, Green = Success).
|
|
2310
|
+
|
|
2311
|
+
**Example:**
|
|
2312
|
+
```
|
|
2313
|
+
❌ Bad: A website where clicking the logo takes you to an "About Us" page.
|
|
2314
|
+
✅ Good: Clicking the logo always returns the user to the Homepage.
|
|
2315
|
+
|
|
2316
|
+
❌ Bad: Using a "Star" icon to represent "Delete."
|
|
2317
|
+
✅ Good: Using a "Trash Can" icon to represent "Delete."
|
|
2318
|
+
```
|
|
2319
|
+
|
|
2320
|
+
---
|
|
2321
|
+
|
|
2322
|
+
### Tesler’s Law (Conservation of Complexity)
|
|
2323
|
+
|
|
2324
|
+
**Principle:** For any system, there is a certain amount of complexity which cannot be reduced, only shifted from user to software.
|
|
2325
|
+
|
|
2326
|
+
**Application:**
|
|
2327
|
+
- **Backend:** Let the system handle formatting (e.g., currency).
|
|
2328
|
+
- **Detection:** Auto-detect card type or city via ZIP code.
|
|
2329
|
+
- **Automation:** Pre-fill returning user data.
|
|
2330
|
+
- **Personalization:** Show only relevant fields based on previous answers.
|
|
2331
|
+
- **Defaults:** Smart defaults for common settings.
|
|
2332
|
+
- **Integration:** Use SSO (Social Logins) to offload registration friction.
|
|
2333
|
+
|
|
2334
|
+
**Example:**
|
|
2335
|
+
```
|
|
2336
|
+
❌ Bad: Making users type "USD $" before every price field in a form.
|
|
2337
|
+
✅ Good: The app automatically prefixing the "$" based on the user's location.
|
|
2338
|
+
|
|
2339
|
+
❌ Bad: Forcing users to manually select their "Card Type" (Visa/Mastercard).
|
|
2340
|
+
✅ Good: Detecting the card type automatically from the first four digits entered.
|
|
2341
|
+
```
|
|
2342
|
+
|
|
2343
|
+
---
|
|
2344
|
+
|
|
2345
|
+
### Parkinson’s Law
|
|
2346
|
+
|
|
2347
|
+
**Principle:** Any task will inflate until all available time is spent.
|
|
2348
|
+
|
|
2349
|
+
**Application:**
|
|
2350
|
+
- **Efficiency:** Use "Auto-save" to reduce task completion time.
|
|
2351
|
+
- **Speed:** Limit the steps in a conversion funnel.
|
|
2352
|
+
- **Clarity:** Use clear labels to prevent "hover-poking" for meaning.
|
|
2353
|
+
- **Feedback:** Real-time validation to stop users from wasting time on errors.
|
|
2354
|
+
- **Onboarding:** Quick "Express" setup for power users.
|
|
2355
|
+
- **Constraints:** Set character limits on inputs to focus thoughts.
|
|
2356
|
+
|
|
2357
|
+
**Example:**
|
|
2358
|
+
```
|
|
2359
|
+
❌ Bad: A 10-page registration form that allows users to browse away and lose data.
|
|
2360
|
+
✅ Good: A "One-Tap Sign In" using Google or Apple ID.
|
|
2361
|
+
|
|
2362
|
+
❌ Bad: Giving a user an indefinite amount of time to fill out a bio.
|
|
2363
|
+
✅ Good: Providing a "Suggested Bios" feature to help them finish in seconds.
|
|
2364
|
+
```
|
|
2365
|
+
|
|
2366
|
+
---
|
|
2367
|
+
|
|
2368
|
+
### Doherty Threshold
|
|
2369
|
+
|
|
2370
|
+
**Principle:** Productivity skyrockets when a computer and its users interact at a pace (<400ms) that ensures neither has to wait on the other.
|
|
2371
|
+
|
|
2372
|
+
**Application:**
|
|
2373
|
+
- **Feedback:** Use immediate visual cues for clicks.
|
|
2374
|
+
- **Loading:** Use skeleton screens for perceivable performance.
|
|
2375
|
+
- **Optimism:** Update UI before the server responds (Optimistic UI).
|
|
2376
|
+
- **Motion:** Use micro-animations to mask slight delays.
|
|
2377
|
+
- **Caching:** Pre-load next pages or assets in the background.
|
|
2378
|
+
- **Prioritization:** Load text content before heavy high-res images.
|
|
2379
|
+
|
|
2380
|
+
**Example:**
|
|
2381
|
+
```
|
|
2382
|
+
❌ Bad: A button that does nothing for 2 seconds after being clicked.
|
|
2383
|
+
✅ Good: A button that immediately changes color and shows a "Loading" spinner.
|
|
2384
|
+
|
|
2385
|
+
❌ Bad: A blank white screen that appears while data is fetching.
|
|
2386
|
+
✅ Good: A skeleton screen showing the gray outlines of where content will appear.
|
|
2387
|
+
```
|
|
2388
|
+
|
|
2389
|
+
---
|
|
2390
|
+
|
|
2391
|
+
### Postel’s Law (Robustness Principle)
|
|
2392
|
+
|
|
2393
|
+
**Principle:** Be conservative in what you do, be liberal in what you accept from others.
|
|
2394
|
+
|
|
2395
|
+
**Application:**
|
|
2396
|
+
- **Error Handling:** Don't error out for a missing space or dash.
|
|
2397
|
+
- **Formatting:** Accept dates in DD/MM/YYYY or MM/DD/YYYY.
|
|
2398
|
+
- **Inputs:** Strip trailing/leading white space automatically.
|
|
2399
|
+
- **Fallbacks:** Use default avatars if a user hasn't uploaded a photo.
|
|
2400
|
+
- **Search:** Accept typos and provide "Did you mean...?" suggestions.
|
|
2401
|
+
- **Accessibility:** Ensure the site works across all browsers and devices.
|
|
2402
|
+
|
|
2403
|
+
**Example:**
|
|
2404
|
+
```
|
|
2405
|
+
❌ Bad: Rejecting a phone number because the user put a space in it.
|
|
2406
|
+
✅ Good: Accepting the input and stripping the spaces automatically.
|
|
2407
|
+
|
|
2408
|
+
❌ Bad: Forcing users to type "January" instead of "01" or "Jan."
|
|
2409
|
+
✅ Good: A date field that understands all three formats.
|
|
2410
|
+
```
|
|
2411
|
+
|
|
2412
|
+
---
|
|
2413
|
+
|
|
2414
|
+
### Occam’s Razor
|
|
2415
|
+
|
|
2416
|
+
**Principle:** Among competing hypotheses that predict equally well, the one with the fewest assumptions should be selected. The simplest solution is usually the best.
|
|
2417
|
+
|
|
2418
|
+
**Application:**
|
|
2419
|
+
- **Logic:** Remove unnecessary clicks.
|
|
2420
|
+
- **Visuals:** Use only as many fonts/colors as strictly necessary.
|
|
2421
|
+
- **Function:** If one field can do the work of two, combine them.
|
|
2422
|
+
- **Copy:** Use the shortest possible text to convey meaning.
|
|
2423
|
+
- **Layout:** Remove decorative elements that don't serve a goal.
|
|
2424
|
+
- **Flow:** Avoid branching paths unless absolutely required.
|
|
2425
|
+
|
|
2426
|
+
**Example:**
|
|
2427
|
+
```
|
|
2428
|
+
❌ Bad: A "Login" button that opens a new page, then email, then password.
|
|
2429
|
+
✅ Good: A single login modal that asks for both on one screen.
|
|
2430
|
+
|
|
2431
|
+
❌ Bad: Using 5 different font sizes and 4 colors on a single card.
|
|
2432
|
+
✅ Good: Using 2 font sizes and 1 accent color.
|
|
2433
|
+
```
|
|
2434
|
+
|
|
2435
|
+
---
|
|
2436
|
+
|
|
2437
|
+
## 2. Visual Perception (Gestalt Principles)
|
|
2438
|
+
|
|
2439
|
+
### Law of Proximity
|
|
2440
|
+
|
|
2441
|
+
**Principle:** Objects that are near, or proximate to each other, tend to be grouped together.
|
|
2442
|
+
|
|
2443
|
+
**Application:**
|
|
2444
|
+
- **Grouping:** Keep labels physically close to input fields.
|
|
2445
|
+
- **Spacing:** Larger margins between unrelated content blocks.
|
|
2446
|
+
- **Cards:** Text inside a card should be closer to its image than the border.
|
|
2447
|
+
- **Footers:** Cluster legal links together away from social links.
|
|
2448
|
+
- **Navigation:** Group "User" settings separate from "App" settings.
|
|
2449
|
+
- **Forms:** Group Address fields together, separate from Credit Card fields.
|
|
2450
|
+
|
|
2451
|
+
**Example:**
|
|
2452
|
+
```
|
|
2453
|
+
❌ Bad: Large, equal gaps between every line of text in a form.
|
|
2454
|
+
✅ Good: Tight spacing between a label and its input, with larger gaps between pairs.
|
|
2455
|
+
|
|
2456
|
+
❌ Bad: A "Submit" button floating in the middle of a page, far from the form.
|
|
2457
|
+
✅ Good: The "Submit" button placed directly under the last input field.
|
|
2458
|
+
```
|
|
2459
|
+
|
|
2460
|
+
---
|
|
2461
|
+
|
|
2462
|
+
### Law of Similarity
|
|
2463
|
+
|
|
2464
|
+
**Principle:** The human eye tends to perceive similar elements in a design as a complete picture, shape, or group, even if those elements are separated.
|
|
2465
|
+
|
|
2466
|
+
**Application:**
|
|
2467
|
+
- **Consistency:** Consistent colors for all clickable links.
|
|
2468
|
+
- **Iconography:** All icons in a set should have the same stroke weight.
|
|
2469
|
+
- **Buttons:** Same shape/size for buttons with the same importance.
|
|
2470
|
+
- **Typography:** Use the same H2 style for all section headers.
|
|
2471
|
+
- **Feedback:** All "Delete" actions should use the same color (e.g. Red).
|
|
2472
|
+
- **States:** Hover and Active states must be consistent across the app.
|
|
2473
|
+
|
|
2474
|
+
**Example:**
|
|
2475
|
+
```
|
|
2476
|
+
❌ Bad: Some links are blue, some are green, and some are just bold black.
|
|
2477
|
+
✅ Good: Every clickable text element in the app is the same shade of Blue.
|
|
2478
|
+
|
|
2479
|
+
❌ Bad: Using a "Blue Button" for "Submit" and the same "Blue Button" for "Cancel."
|
|
2480
|
+
✅ Good: "Submit" is Solid Blue; "Cancel" is a Blue Outline (Ghost Button).
|
|
2481
|
+
```
|
|
2482
|
+
|
|
2483
|
+
---
|
|
2484
|
+
|
|
2485
|
+
### Law of Common Region
|
|
2486
|
+
|
|
2487
|
+
**Principle:** Elements tend to be perceived into groups if they are sharing an area with a clearly defined boundary.
|
|
2488
|
+
|
|
2489
|
+
**Application:**
|
|
2490
|
+
- **Containerizing:** Use cards to group images and titles.
|
|
2491
|
+
- **Borders:** Use lines to separate the sidebar from the main feed.
|
|
2492
|
+
- **Backgrounds:** Use a different background color for the footer.
|
|
2493
|
+
- **Modals:** Use a distinct box to separate pop-ups from the page.
|
|
2494
|
+
- **Lists:** Alternating background colors (zebra striping) for rows.
|
|
2495
|
+
- **Header:** A solid bar across the top to group navigation items.
|
|
2496
|
+
|
|
2497
|
+
**Example:**
|
|
2498
|
+
```
|
|
2499
|
+
❌ Bad: A list of news articles where the text and image of different stories overlap.
|
|
2500
|
+
✅ Good: Each article is contained within its own white card on a light gray background.
|
|
2501
|
+
|
|
2502
|
+
❌ Bad: A footer that has the same background color as the main body.
|
|
2503
|
+
✅ Good: A dark-themed footer that clearly separates legal links from page content.
|
|
2504
|
+
```
|
|
2505
|
+
|
|
2506
|
+
---
|
|
2507
|
+
|
|
2508
|
+
### Law of Uniform Connectedness
|
|
2509
|
+
|
|
2510
|
+
**Principle:** Elements that are visually connected (e.g., via lines, arrows) are perceived as more related than elements with no connection.
|
|
2511
|
+
|
|
2512
|
+
**Application:**
|
|
2513
|
+
- **Flow:** Use lines to connect steps in a progress wizard.
|
|
2514
|
+
- **Menus:** Dropdowns that "touch" or connect to their parent button.
|
|
2515
|
+
- **Graphs:** Lines connecting data points in a chart.
|
|
2516
|
+
- **Relationship:** Connecting a toggle switch to the text it controls.
|
|
2517
|
+
- **Hierarchy:** Tree structures for file directories.
|
|
2518
|
+
- **Forms:** Connecting a "Credit Card" radio button to the fieldset below it.
|
|
2519
|
+
|
|
2520
|
+
**Example:**
|
|
2521
|
+
```
|
|
2522
|
+
❌ Bad: A 3-step setup where the numbers "1", "2", and "3" are scattered.
|
|
2523
|
+
✅ Good: A horizontal line connecting "1", "2", and "3" to show a sequence.
|
|
2524
|
+
|
|
2525
|
+
❌ Bad: Floating dropdown menus that don't touch the button that opened them.
|
|
2526
|
+
✅ Good: A dropdown menu that visually "attaches" to the parent button.
|
|
2527
|
+
```
|
|
2528
|
+
|
|
2529
|
+
---
|
|
2530
|
+
|
|
2531
|
+
### Law of Prägnanz (Simplicity)
|
|
2532
|
+
|
|
2533
|
+
**Principle:** People will perceive and interpret ambiguous or complex images as the simplest form possible, because it is the interpretation that requires the least cognitive effort.
|
|
2534
|
+
|
|
2535
|
+
**Application:**
|
|
2536
|
+
- **Clarity:** Use clear, geometric icons for navigation.
|
|
2537
|
+
- **Reduction:** Remove unnecessary 3D textures or shadows.
|
|
2538
|
+
- **Shapes:** Prefer standard rectangles/circles over complex polygons.
|
|
2539
|
+
- **Focus:** Use high-contrast silhouettes for primary actions.
|
|
2540
|
+
- **Logos:** Simple brand marks that are recognizable at small sizes.
|
|
2541
|
+
- **UX:** One main goal per page to keep the "mental shape" simple.
|
|
2542
|
+
|
|
2543
|
+
**Example:**
|
|
2544
|
+
```
|
|
2545
|
+
❌ Bad: A hyper-realistic 3D illustration of a file folder for the "Files" icon.
|
|
2546
|
+
✅ Good: A simple 2D outline of a folder.
|
|
2547
|
+
|
|
2548
|
+
❌ Bad: A multi-colored, complex logo used as a loading spinner.
|
|
2549
|
+
✅ Good: A simple, single-color circular ring.
|
|
2550
|
+
```
|
|
2551
|
+
|
|
2552
|
+
---
|
|
2553
|
+
|
|
2554
|
+
### Law of Figure/Ground
|
|
2555
|
+
|
|
2556
|
+
**Principle:** The eye differentiates an object from its surrounding area. a form, silhouette, or shape is perceived as figure (object), while the surrounding area is perceived as ground (background).
|
|
2557
|
+
|
|
2558
|
+
**Application:**
|
|
2559
|
+
- **Focus:** Use overlays (scrims) for modals to pop the content.
|
|
2560
|
+
- **Depth:** Drop shadows to imply the "figure" is sitting above the "ground."
|
|
2561
|
+
- **Contrast:** Light text on dark ground (or vice versa).
|
|
2562
|
+
- **Blur:** Use background blur to emphasize foreground text.
|
|
2563
|
+
- **Navigation:** Floating sticky headers that stay above the page content.
|
|
2564
|
+
- **Hover:** Elevate cards slightly on hover to define them as the figure.
|
|
2565
|
+
|
|
2566
|
+
**Example:**
|
|
2567
|
+
```
|
|
2568
|
+
❌ Bad: A popup window that has no shadow or border, blending into the page.
|
|
2569
|
+
✅ Good: A modal with a drop shadow and a dimmed background overlay.
|
|
2570
|
+
|
|
2571
|
+
❌ Bad: White text placed directly over a busy, multi-colored photograph.
|
|
2572
|
+
✅ Good: White text placed over a dark semi-transparent "scrim."
|
|
2573
|
+
```
|
|
2574
|
+
|
|
2575
|
+
---
|
|
2576
|
+
|
|
2577
|
+
### Law of Focal Point
|
|
2578
|
+
|
|
2579
|
+
**Principle:** Whatever stands out visually will capture and hold the viewer’s attention first.
|
|
2580
|
+
|
|
2581
|
+
**Application:**
|
|
2582
|
+
- **Entry:** Place the primary value proposition at the focal point.
|
|
2583
|
+
- **Color:** Use one high-vibrancy "Action Color" against a neutral UI.
|
|
2584
|
+
- **Movement:** Use subtle animation on the CTA to draw the eye.
|
|
2585
|
+
- **Size:** The most important statistic should be the largest font.
|
|
2586
|
+
- **Typography:** Use bold weights for headers and standard weights for body.
|
|
2587
|
+
- **Direction:** Use arrows or gaze (images of people looking at a button).
|
|
2588
|
+
|
|
2589
|
+
**Example:**
|
|
2590
|
+
```
|
|
2591
|
+
❌ Bad: A homepage with 5 buttons of the same size and color.
|
|
2592
|
+
✅ Good: One large "Get Started" button in a bright color.
|
|
2593
|
+
|
|
2594
|
+
❌ Bad: A dashboard where "Total Revenue" is the same size as "System Version."
|
|
2595
|
+
✅ Good: "Total Revenue" displayed in huge, bold numbers at the top center.
|
|
2596
|
+
```
|
|
2597
|
+
|
|
2598
|
+
---
|
|
2599
|
+
|
|
2600
|
+
## 3. Cognitive Biases & Behavior
|
|
2601
|
+
|
|
2602
|
+
### Zeigarnik Effect
|
|
2603
|
+
|
|
2604
|
+
**Principle:** People remember uncompleted or interrupted tasks better than completed tasks.
|
|
2605
|
+
|
|
2606
|
+
**Application:**
|
|
2607
|
+
- **Gamification:** Use "Profile 60% complete" bars.
|
|
2608
|
+
- **Engagement:** Tease the next module in a learning path.
|
|
2609
|
+
- **Retention:** Show a "To-Do" list of features yet to be explored.
|
|
2610
|
+
- **Feedback:** Persistent badges for unread messages.
|
|
2611
|
+
- **Momentum:** Show "Next" steps immediately after completing one.
|
|
2612
|
+
- **Shopping:** "Finish your order" reminders in the cart.
|
|
2613
|
+
|
|
2614
|
+
**Example:**
|
|
2615
|
+
```
|
|
2616
|
+
❌ Bad: A silent onboarding process that gives no indication of what's left.
|
|
2617
|
+
✅ Good: A checklist that shows "3 of 5 steps finished."
|
|
2618
|
+
|
|
2619
|
+
❌ Bad: An e-learning app that shows a checkmark even if a video was half-watched.
|
|
2620
|
+
✅ Good: A progress ring that stays half-full until the video is finished.
|
|
2621
|
+
```
|
|
2622
|
+
|
|
2623
|
+
### Goal Gradient Effect
|
|
2624
|
+
|
|
2625
|
+
**Principle:** The tendency to approach a goal increases with proximity to the goal.
|
|
2626
|
+
|
|
2627
|
+
**Application:**
|
|
2628
|
+
- **Momentum:** Give users "Artificial Advancement" (e.g. 2 free stamps).
|
|
2629
|
+
- **Progress:** Break a 10-field form into two 5-field steps.
|
|
2630
|
+
- **Feedback:** Celebrate milestones halfway through a task.
|
|
2631
|
+
- **Motivation:** Show the user how close they are to a reward/status.
|
|
2632
|
+
- **Navigation:** Use breadcrumbs to show how close they are to the end.
|
|
2633
|
+
- **Loading:** Speed up the loading animation as it nears 100%.
|
|
2634
|
+
|
|
2635
|
+
**Example:**
|
|
2636
|
+
```
|
|
2637
|
+
❌ Bad: A progress bar that starts at 0% and feels like a long climb.
|
|
2638
|
+
✅ Good: A bar that starts at 20% because the user "started" by opening the app.
|
|
2639
|
+
|
|
2640
|
+
❌ Bad: A checkout flow where the "Final Review" feels like a surprise 5th step.
|
|
2641
|
+
✅ Good: Clearly labeling the steps: "Shipping > Payment > Almost Done!"
|
|
2642
|
+
```
|
|
2643
|
+
|
|
2644
|
+
### Peak-End Rule
|
|
2645
|
+
|
|
2646
|
+
**Principle:** People judge an experience largely based on how they felt at its peak (the most intense point) and at its end, rather than the total sum or average of every moment.
|
|
2647
|
+
|
|
2648
|
+
**Application:**
|
|
2649
|
+
- **Success:** Make the "Order Confirmed" screen memorable.
|
|
2650
|
+
- **Delight:** Add confetti or a unique animation at the point of value.
|
|
2651
|
+
- **Support:** Ensure the final interaction with a chat bot is helpful.
|
|
2652
|
+
- **Unboarding:** Even when a user leaves, make the final exit clean.
|
|
2653
|
+
- **Onboarding:** End the first session with a clear "Win."
|
|
2654
|
+
- **Error Handling:** Turn a 404 page into a fun, helpful interaction.
|
|
2655
|
+
|
|
2656
|
+
**Example:**
|
|
2657
|
+
```
|
|
2658
|
+
❌ Bad: After a 20-minute tax filing process, the app just says "Submitted."
|
|
2659
|
+
✅ Good: A "Congratulations!" screen with a summary of the refund amount.
|
|
2660
|
+
|
|
2661
|
+
❌ Bad: A game that ends with a simple "Game Over" text in plain font.
|
|
2662
|
+
✅ Good: A summary screen showing high scores with celebratory music.
|
|
2663
|
+
```
|
|
2664
|
+
|
|
2665
|
+
### Aesthetic-Usability Effect
|
|
2666
|
+
|
|
2667
|
+
**Principle:** Users often perceive aesthetically pleasing design as design that’s more usable.
|
|
2668
|
+
|
|
2669
|
+
**Application:**
|
|
2670
|
+
- **Trust:** High-fidelity visuals buy "trust credit" for minor bugs.
|
|
2671
|
+
- **Branding:** Consistent high-quality imagery build professionalism.
|
|
2672
|
+
- **Engagement:** Beautiful interfaces keep users exploring longer.
|
|
2673
|
+
- **Patience:** Users are more forgiving of load times if the UI is pretty.
|
|
2674
|
+
- **Confidence:** Clean design makes complex tools feel more manageable.
|
|
2675
|
+
- **Loyalty:** People form emotional bonds with beautiful products.
|
|
2676
|
+
|
|
2677
|
+
**Example:**
|
|
2678
|
+
```
|
|
2679
|
+
❌ Bad: A banking app with misaligned text and clashing 1990s colors.
|
|
2680
|
+
✅ Good: A sleek, modern banking app with smooth animations.
|
|
2681
|
+
|
|
2682
|
+
❌ Bad: Using low-resolution, pixelated stock photos.
|
|
2683
|
+
✅ Good: Using high-definition, custom brand illustrations.
|
|
2684
|
+
```
|
|
2685
|
+
|
|
2686
|
+
### Anchoring Bias
|
|
2687
|
+
|
|
2688
|
+
**Principle:** Users rely heavily on the first piece of information offered (the "anchor") when making decisions.
|
|
2689
|
+
|
|
2690
|
+
**Application:**
|
|
2691
|
+
- **Pricing:** Show the original price crossed out.
|
|
2692
|
+
- **Tiers:** Put the most expensive "Enterprise" plan on the far left.
|
|
2693
|
+
- **Sorting:** Highlight "Most Popular" as the first recommendation.
|
|
2694
|
+
- **Discounts:** State the "Save 20%" before showing the final price.
|
|
2695
|
+
- **Limits:** "Limit 12 per customer" anchors the idea that it's high value.
|
|
2696
|
+
- **Defaults:** Start with a high "Suggested Donation" amount.
|
|
2697
|
+
|
|
2698
|
+
**Example:**
|
|
2699
|
+
```
|
|
2700
|
+
❌ Bad: Only showing the price "$49."
|
|
2701
|
+
✅ Good: Showing "~~$99~~ $49 (50% Off)."
|
|
2702
|
+
|
|
2703
|
+
❌ Bad: Sorting a list of laptops from cheapest to most expensive.
|
|
2704
|
+
✅ Good: Showing a high-end "Pro" model first to make others seem cheap.
|
|
2705
|
+
```
|
|
2706
|
+
|
|
2707
|
+
### Social Proof
|
|
2708
|
+
|
|
2709
|
+
**Principle:** People copy the actions of others in an attempt to undertake behavior in a given situation.
|
|
2710
|
+
|
|
2711
|
+
**Application:**
|
|
2712
|
+
- **Validation:** Display "Join 50,000+ others."
|
|
2713
|
+
- **Reviews:** Star ratings and verified customer testimonials.
|
|
2714
|
+
- **Logos:** "Trusted by" section showing partner brands.
|
|
2715
|
+
- **Live Feed:** "Sarah just bought this 5 mins ago" notifications.
|
|
2716
|
+
- **Activity:** "300 people are currently viewing this item."
|
|
2717
|
+
- **Certificates:** Industry awards and security badges.
|
|
2718
|
+
|
|
2719
|
+
**Example:**
|
|
2720
|
+
```
|
|
2721
|
+
❌ Bad: A signup page with just a form.
|
|
2722
|
+
✅ Good: A signup page that says "Join 2 million designers."
|
|
2723
|
+
|
|
2724
|
+
❌ Bad: Anonymous reviews with no names or photos.
|
|
2725
|
+
✅ Good: Reviews that include a face, a name, and a "Verified Buyer" tag.
|
|
2726
|
+
```
|
|
2727
|
+
|
|
2728
|
+
### Scarcity Principle
|
|
2729
|
+
|
|
2730
|
+
**Principle:** Humans place a higher value on an object that is scarce, and a lower value on those that are in abundance.
|
|
2731
|
+
|
|
2732
|
+
**Application:**
|
|
2733
|
+
- **Urgency:** "Only 2 items left in stock."
|
|
2734
|
+
- **Time:** Ticking countdown timers for sales.
|
|
2735
|
+
- **Access:** "Invite-only" betas or exclusive tiers.
|
|
2736
|
+
- **Seasonality:** "Summer Edition" products.
|
|
2737
|
+
- **Low Stock:** "Back in stock soon - pre-order now."
|
|
2738
|
+
- **Demand:** "In high demand - 10 people have this in their cart."
|
|
2739
|
+
|
|
2740
|
+
**Example:**
|
|
2741
|
+
```
|
|
2742
|
+
❌ Bad: A sale that never ends and has no countdown.
|
|
2743
|
+
✅ Good: A "Deal of the Day" with a ticking timer.
|
|
2744
|
+
|
|
2745
|
+
❌ Bad: Showing a product is available with no stock count.
|
|
2746
|
+
✅ Good: "Only 3 left at this price!"
|
|
2747
|
+
```
|
|
2748
|
+
|
|
2749
|
+
### Authority Bias
|
|
2750
|
+
|
|
2751
|
+
**Principle:** The tendency to attribute greater accuracy to the opinion of an authority figure and be more influenced by that opinion.
|
|
2752
|
+
|
|
2753
|
+
**Application:**
|
|
2754
|
+
- **Expertise:** Use "Expert-verified" or professional headshots.
|
|
2755
|
+
- **Certifications:** Trust seals (Norton, ISO, HIPAA).
|
|
2756
|
+
- **Media:** "As seen on TechCrunch/Forbes" logos.
|
|
2757
|
+
- **Endorsements:** Testimonials from industry leaders or influencers.
|
|
2758
|
+
- **Language:** Confident, professional, and accurate copy.
|
|
2759
|
+
- **History:** "Established in 1950" to imply longevity and trust.
|
|
2760
|
+
|
|
2761
|
+
**Example:**
|
|
2762
|
+
```
|
|
2763
|
+
❌ Bad: A health blog written by "Admin."
|
|
2764
|
+
✅ Good: A health article "Reviewed by Dr. Jane Smith, Cardiologist."
|
|
2765
|
+
|
|
2766
|
+
❌ Bad: A security app with no mentions of certifications.
|
|
2767
|
+
✅ Good: Displaying "ISO 27001 Certified" and "Norton Secured" logos.
|
|
2768
|
+
```
|
|
2769
|
+
|
|
2770
|
+
### Loss Aversion
|
|
2771
|
+
|
|
2772
|
+
**Principle:** People generally prefer avoiding losses to acquiring equivalent gains. It is better to not lose $5 than to find $5.
|
|
2773
|
+
|
|
2774
|
+
**Application:**
|
|
2775
|
+
- **Messaging:** "Don't lose your discount."
|
|
2776
|
+
- **Trials:** "Your free trial is ending - keep your data now."
|
|
2777
|
+
- **Scarcity:** "Once it's gone, it's gone for good."
|
|
2778
|
+
- **Carts:** "Don't miss out on the items in your cart."
|
|
2779
|
+
- **Loyalty:** "You've earned 500 points - don't let them expire."
|
|
2780
|
+
- **Risk:** "30-day money-back guarantee" (reduces the "loss" of money).
|
|
2781
|
+
|
|
2782
|
+
**Example:**
|
|
2783
|
+
```
|
|
2784
|
+
❌ Bad: "Click here to get a $10 coupon."
|
|
2785
|
+
✅ Good: "You have a $10 credit waiting. Use it before it expires tonight!"
|
|
2786
|
+
|
|
2787
|
+
❌ Bad: "Cancel your subscription."
|
|
2788
|
+
✅ Good: "If you cancel, you will lose access to your 50 saved projects."
|
|
2789
|
+
```
|
|
2790
|
+
|
|
2791
|
+
### False-Consensus Effect
|
|
2792
|
+
|
|
2793
|
+
**Principle:** People tend to overestimate the extent to which their opinions, beliefs, preferences, values, and habits are normal and typical of those of others.
|
|
2794
|
+
|
|
2795
|
+
**Application:**
|
|
2796
|
+
- **Testing:** You are not the user - test with real target audiences.
|
|
2797
|
+
- **Research:** Use qualitative data (interviews) and quantitative data (analytics).
|
|
2798
|
+
- **Bias:** Use "Blind Design Reviews" to avoid personal favoritism.
|
|
2799
|
+
- **Persona:** Stick to established User Personas over personal hunches.
|
|
2800
|
+
- **Variation:** Test with users from different demographics/abilities.
|
|
2801
|
+
- **Objectivity:** Use heatmaps to see actual user behavior.
|
|
2802
|
+
|
|
2803
|
+
**Example:**
|
|
2804
|
+
```
|
|
2805
|
+
❌ Bad: A designer deciding a feature is "intuitive" without testing it.
|
|
2806
|
+
✅ Good: Running an A/B test to see which version users prefer.
|
|
2807
|
+
|
|
2808
|
+
❌ Bad: Building an app entirely in English because "everyone knows English."
|
|
2809
|
+
✅ Good: Adding localization based on actual user location data.
|
|
2810
|
+
```
|
|
2811
|
+
|
|
2812
|
+
### Curse of Knowledge
|
|
2813
|
+
|
|
2814
|
+
**Principle:** A cognitive bias that occurs when an individual, communicating with other individuals, unknowingly assumes that the others have the background to understand.
|
|
2815
|
+
|
|
2816
|
+
**Application:**
|
|
2817
|
+
- **Copy:** Avoid jargon and use plain language.
|
|
2818
|
+
- **Onboarding:** Tutorials that assume the user knows nothing.
|
|
2819
|
+
- **Tooltips:** Explain complex terms on hover.
|
|
2820
|
+
- **Structure:** Progressive disclosure (hide advanced settings).
|
|
2821
|
+
- **Labels:** Use icons + text labels for navigation (don't rely on icons alone).
|
|
2822
|
+
- **Support:** Comprehensive FAQs for first-time users.
|
|
2823
|
+
|
|
2824
|
+
**Example:**
|
|
2825
|
+
```
|
|
2826
|
+
❌ Bad: An error message saying "Exception: Null Pointer at 0x0045."
|
|
2827
|
+
✅ Good: An error message saying "Something went wrong. Please try refreshing."
|
|
2828
|
+
|
|
2829
|
+
❌ Bad: Navigating a cloud app using terms like "S3 Bucket Instances."
|
|
2830
|
+
✅ Good: Using simple terms like "File Storage."
|
|
2831
|
+
```
|
|
2832
|
+
|
|
2833
|
+
### Stepping Stone Effect (Foot-in-the-Door)
|
|
2834
|
+
|
|
2835
|
+
**Principle:** Users commit to large tasks if they start with small ones.
|
|
2836
|
+
|
|
2837
|
+
**Application:**
|
|
2838
|
+
- **Funnel:** Ask for email before asking for credit card.
|
|
2839
|
+
- **Engagement:** Ask for one preference (e.g. "Dark Mode?") before registration.
|
|
2840
|
+
- **Onboarding:** Use a series of "Quick Yes/No" questions.
|
|
2841
|
+
- **Trust:** Offer a free PDF/tool before asking for a subscription.
|
|
2842
|
+
- **Profile:** Ask to upload a photo first, then fill out the bio later.
|
|
2843
|
+
- **Sales:** Offer a low-cost "tripwire" product before the main service.
|
|
2844
|
+
|
|
2845
|
+
**Example:**
|
|
2846
|
+
```
|
|
2847
|
+
❌ Bad: A "Start Free Trial" button that immediately requires credit card info.
|
|
2848
|
+
✅ Good: Asking for an email and password first, then offering the trial.
|
|
2849
|
+
|
|
2850
|
+
❌ Bad: A survey that shows all 50 questions on one page.
|
|
2851
|
+
✅ Good: A survey that starts with one easy "Yes/No" question.
|
|
2852
|
+
```
|
|
2853
|
+
|
|
2854
|
+
---
|
|
2855
|
+
|
|
2856
|
+
## 2. Emotional Design (Don Norman)
|
|
2857
|
+
|
|
2858
|
+
### Three Levels of Processing
|
|
2859
|
+
|
|
2860
|
+
```
|
|
2861
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
2862
|
+
│ VISCERAL (Lizard Brain) │
|
|
2863
|
+
│ ───────────────────── │
|
|
2864
|
+
│ • Immediate, automatic reaction │
|
|
2865
|
+
│ • First impressions (first 50ms) │
|
|
2866
|
+
│ • Aesthetics: colors, shapes, imagery │
|
|
2867
|
+
│ • "Wow, this looks beautiful!" │
|
|
2868
|
+
├─────────────────────────────────────────────────────────────┤
|
|
2869
|
+
│ BEHAVIORAL (Functional Brain) │
|
|
2870
|
+
│ ───────────────────────────── │
|
|
2871
|
+
│ • Usability and function │
|
|
2872
|
+
│ • Pleasure from effective use │
|
|
2873
|
+
│ • Performance, reliability, ease │
|
|
2874
|
+
│ • "This works exactly how I expected!" │
|
|
2875
|
+
├─────────────────────────────────────────────────────────────┤
|
|
2876
|
+
│ REFLECTIVE (Conscious Brain) │
|
|
2877
|
+
│ ───────────────────────────── │
|
|
2878
|
+
│ • Conscious thought and meaning │
|
|
2879
|
+
│ • Personal identity and values │
|
|
2880
|
+
│ • Long-term memory and loyalty │
|
|
2881
|
+
│ • "This brand represents who I am" │
|
|
2882
|
+
└─────────────────────────────────────────────────────────────┘
|
|
2883
|
+
```
|
|
2884
|
+
|
|
2885
|
+
### Designing for Each Level
|
|
2886
|
+
|
|
2887
|
+
**Visceral:**
|
|
2888
|
+
```css
|
|
2889
|
+
/* Beautiful first impression */
|
|
2890
|
+
.hero {
|
|
2891
|
+
background: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%);
|
|
2892
|
+
color: white;
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
/* Pleasing microinteractions */
|
|
2896
|
+
.button:hover {
|
|
2897
|
+
transform: translateY(-2px);
|
|
2898
|
+
box-shadow: var(--shadow-lg);
|
|
2899
|
+
}
|
|
2900
|
+
```
|
|
2901
|
+
|
|
2902
|
+
**Behavioral:**
|
|
2903
|
+
```javascript
|
|
2904
|
+
// Instant feedback
|
|
2905
|
+
button.onclick = () => {
|
|
2906
|
+
button.disabled = true;
|
|
2907
|
+
button.textContent = 'Saving...';
|
|
2908
|
+
|
|
2909
|
+
save().then(() => {
|
|
2910
|
+
showSuccess('Saved!'); // Immediate confirmation
|
|
2911
|
+
});
|
|
2912
|
+
};
|
|
2913
|
+
```
|
|
2914
|
+
|
|
2915
|
+
**Reflective:**
|
|
2916
|
+
```html
|
|
2917
|
+
<!-- Brand story and values -->
|
|
2918
|
+
<section class="about">
|
|
2919
|
+
<h2>Why We Exist</h2>
|
|
2920
|
+
<p>We believe technology should empower, not complicate...</p>
|
|
2921
|
+
</section>
|
|
2922
|
+
|
|
2923
|
+
<!-- Social proof connecting to identity -->
|
|
2924
|
+
<blockquote>
|
|
2925
|
+
"This tool helped me become the designer I wanted to be."
|
|
2926
|
+
</blockquote>
|
|
2927
|
+
```
|
|
2928
|
+
|
|
2929
|
+
---
|
|
2930
|
+
|
|
2931
|
+
## 3. Trust Building System
|
|
2932
|
+
|
|
2933
|
+
### Trust Signal Categories
|
|
2934
|
+
|
|
2935
|
+
| Category | Elements | Implementation |
|
|
2936
|
+
|----------|----------|----------------|
|
|
2937
|
+
| **Security** | SSL, badges, encryption | Visible padlock, security logos on forms |
|
|
2938
|
+
| **Social Proof** | Reviews, testimonials, logos | Star ratings, customer photos, brand logos |
|
|
2939
|
+
| **Transparency** | Policies, pricing, contact | Clear links, no hidden fees, real address |
|
|
2940
|
+
| **Professional** | Design quality, consistency | No broken elements, consistent branding |
|
|
2941
|
+
| **Authority** | Certifications, awards, media | "As seen in...", industry certifications |
|
|
2942
|
+
|
|
2943
|
+
### Trust Signal Placement
|
|
2944
|
+
|
|
2945
|
+
```
|
|
2946
|
+
┌────────────────────────────────────────────────────┐
|
|
2947
|
+
│ HEADER: Trust banner ("Free shipping | 30-day │
|
|
2948
|
+
│ returns | Secure checkout") │
|
|
2949
|
+
├────────────────────────────────────────────────────┤
|
|
2950
|
+
│ HERO: Social proof ("Trusted by 10,000+") │
|
|
2951
|
+
├────────────────────────────────────────────────────┤
|
|
2952
|
+
│ PRODUCT: Reviews visible, security badges │
|
|
2953
|
+
├────────────────────────────────────────────────────┤
|
|
2954
|
+
│ CHECKOUT: Payment icons, SSL badge, guarantee │
|
|
2955
|
+
├────────────────────────────────────────────────────┤
|
|
2956
|
+
│ FOOTER: Contact info, policies, certifications │
|
|
2957
|
+
└────────────────────────────────────────────────────┘
|
|
2958
|
+
```
|
|
2959
|
+
|
|
2960
|
+
### Trust-Building CSS Patterns
|
|
2961
|
+
|
|
2962
|
+
```css
|
|
2963
|
+
/* Trust badge styling */
|
|
2964
|
+
.trust-badge {
|
|
2965
|
+
display: flex;
|
|
2966
|
+
align-items: center;
|
|
2967
|
+
gap: 8px;
|
|
2968
|
+
padding: 12px 16px;
|
|
2969
|
+
background: #F0FDF4; /* Light green = security */
|
|
2970
|
+
border-radius: 2px; /* Sharp for trust = precision feel */
|
|
2971
|
+
font-size: 14px;
|
|
2972
|
+
color: #166534;
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
/* Secure form indicator */
|
|
2976
|
+
.secure-form::before {
|
|
2977
|
+
content: '🔒 Secure form';
|
|
2978
|
+
display: block;
|
|
2979
|
+
font-size: 12px;
|
|
2980
|
+
color: #166534;
|
|
2981
|
+
margin-bottom: 8px;
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
/* Testimonial card */
|
|
2985
|
+
.testimonial {
|
|
2986
|
+
display: flex;
|
|
2987
|
+
gap: 16px;
|
|
2988
|
+
padding: 24px;
|
|
2989
|
+
background: white;
|
|
2990
|
+
border-radius: 16px; /* Friendly = larger radius */
|
|
2991
|
+
box-shadow: var(--shadow-sm);
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
.testimonial-avatar {
|
|
2995
|
+
width: 48px;
|
|
2996
|
+
height: 48px;
|
|
2997
|
+
border-radius: 50%; /* Real photos > initials */
|
|
2998
|
+
}
|
|
2999
|
+
```
|
|
3000
|
+
|
|
3001
|
+
---
|
|
3002
|
+
|
|
3003
|
+
## 4. Cognitive Load Management
|
|
3004
|
+
|
|
3005
|
+
### Three Types of Cognitive Load
|
|
3006
|
+
|
|
3007
|
+
| Type | Definition | Designer's Role |
|
|
3008
|
+
|------|------------|-----------------|
|
|
3009
|
+
| **Intrinsic** | Inherent complexity of task | Break into smaller steps |
|
|
3010
|
+
| **Extraneous** | Load from poor design | Eliminate this! |
|
|
3011
|
+
| **Germane** | Effort for learning | Support and encourage |
|
|
3012
|
+
|
|
3013
|
+
### Reduction Strategies
|
|
3014
|
+
|
|
3015
|
+
**1. Simplify (Reduce Extraneous)**
|
|
3016
|
+
```css
|
|
3017
|
+
/* Visual noise → Clean */
|
|
3018
|
+
.card-busy {
|
|
3019
|
+
border: 2px solid red;
|
|
3020
|
+
background: linear-gradient(...);
|
|
3021
|
+
box-shadow: 0 0 20px ...;
|
|
3022
|
+
/* Too much! */
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
.card-clean {
|
|
3026
|
+
background: white;
|
|
3027
|
+
border-radius: 16px;
|
|
3028
|
+
box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
|
|
3029
|
+
/* Calm, focused */
|
|
3030
|
+
}
|
|
3031
|
+
```
|
|
3032
|
+
|
|
3033
|
+
**2. Chunk Information**
|
|
3034
|
+
```html
|
|
3035
|
+
<!-- Overwhelming -->
|
|
3036
|
+
<form>
|
|
3037
|
+
<!-- 15 fields at once -->
|
|
3038
|
+
</form>
|
|
3039
|
+
|
|
3040
|
+
<!-- Chunked -->
|
|
3041
|
+
<form>
|
|
3042
|
+
<fieldset>
|
|
3043
|
+
<legend>Step 1: Personal Info</legend>
|
|
3044
|
+
<!-- 3-4 fields -->
|
|
3045
|
+
</fieldset>
|
|
3046
|
+
<fieldset>
|
|
3047
|
+
<legend>Step 2: Shipping</legend>
|
|
3048
|
+
<!-- 3-4 fields -->
|
|
3049
|
+
</fieldset>
|
|
3050
|
+
</form>
|
|
3051
|
+
```
|
|
3052
|
+
|
|
3053
|
+
**3. Progressive Disclosure**
|
|
3054
|
+
```html
|
|
3055
|
+
<!-- Hide complexity until needed -->
|
|
3056
|
+
<div class="filters">
|
|
3057
|
+
<div class="filters-basic">
|
|
3058
|
+
<!-- Common filters visible -->
|
|
3059
|
+
</div>
|
|
3060
|
+
<button onclick="toggleAdvanced()">
|
|
3061
|
+
Advanced Options ▼
|
|
3062
|
+
</button>
|
|
3063
|
+
<div class="filters-advanced" hidden>
|
|
3064
|
+
<!-- Complex filters hidden -->
|
|
3065
|
+
</div>
|
|
3066
|
+
</div>
|
|
3067
|
+
```
|
|
3068
|
+
|
|
3069
|
+
**4. Use Familiar Patterns**
|
|
3070
|
+
```
|
|
3071
|
+
✅ Standard navigation placement
|
|
3072
|
+
✅ Expected icon meanings (🔍 = search)
|
|
3073
|
+
✅ Conventional form layouts
|
|
3074
|
+
✅ Common gesture patterns (swipe, pinch)
|
|
3075
|
+
```
|
|
3076
|
+
|
|
3077
|
+
**5. Offload Information**
|
|
3078
|
+
```html
|
|
3079
|
+
<!-- Don't make users remember -->
|
|
3080
|
+
<label>
|
|
3081
|
+
Card Number
|
|
3082
|
+
<input type="text" inputmode="numeric"
|
|
3083
|
+
autocomplete="cc-number"
|
|
3084
|
+
placeholder="1234 5678 9012 3456">
|
|
3085
|
+
</label>
|
|
3086
|
+
|
|
3087
|
+
<!-- Show what they entered -->
|
|
3088
|
+
<div class="order-summary">
|
|
3089
|
+
<p>Shipping to: <strong>John Doe, 123 Main St...</strong></p>
|
|
3090
|
+
<a href="#">Edit</a>
|
|
3091
|
+
</div>
|
|
3092
|
+
```
|
|
3093
|
+
|
|
3094
|
+
---
|
|
3095
|
+
|
|
3096
|
+
## 5. Persuasive Design (Ethical)
|
|
3097
|
+
|
|
3098
|
+
### Ethical Persuasion Techniques
|
|
3099
|
+
|
|
3100
|
+
| Technique | Ethical Use | Dark Pattern (Avoid) |
|
|
3101
|
+
|-----------|-------------|----------------------|
|
|
3102
|
+
| **Scarcity** | Real stock levels | Fake countdown timers |
|
|
3103
|
+
| **Social Proof** | Genuine reviews | Fake testimonials |
|
|
3104
|
+
| **Authority** | Real credentials | Misleading badges |
|
|
3105
|
+
| **Urgency** | Real deadlines | Manufactured FOMO |
|
|
3106
|
+
| **Commitment** | Progress saving | Guilt-tripping |
|
|
3107
|
+
|
|
3108
|
+
### Nudge Patterns
|
|
3109
|
+
|
|
3110
|
+
**Smart Defaults:**
|
|
3111
|
+
```html
|
|
3112
|
+
<!-- Pre-select the recommended option -->
|
|
3113
|
+
<input type="radio" name="plan" value="monthly">
|
|
3114
|
+
<input type="radio" name="plan" value="annual" checked>
|
|
3115
|
+
Annual (Save 20%)
|
|
3116
|
+
```
|
|
3117
|
+
|
|
3118
|
+
**Anchoring:**
|
|
3119
|
+
```html
|
|
3120
|
+
<!-- Show original price to frame discount -->
|
|
3121
|
+
<div class="price">
|
|
3122
|
+
<span class="original">$99</span>
|
|
3123
|
+
<span class="current">$79</span>
|
|
3124
|
+
<span class="savings">Save 20%</span>
|
|
3125
|
+
</div>
|
|
3126
|
+
```
|
|
3127
|
+
|
|
3128
|
+
**Social Proof:**
|
|
3129
|
+
```html
|
|
3130
|
+
<!-- Real-time activity -->
|
|
3131
|
+
<div class="activity">
|
|
3132
|
+
<span class="avatar">👤</span>
|
|
3133
|
+
<span>Sarah from NYC just purchased</span>
|
|
3134
|
+
</div>
|
|
3135
|
+
|
|
3136
|
+
<!-- Aggregate proof -->
|
|
3137
|
+
<p>Join 50,000+ designers who use our tool</p>
|
|
3138
|
+
```
|
|
3139
|
+
|
|
3140
|
+
**Progress & Commitment:**
|
|
3141
|
+
```html
|
|
3142
|
+
<!-- Show progress to encourage completion -->
|
|
3143
|
+
<div class="progress">
|
|
3144
|
+
<div class="progress-bar" style="width: 60%"></div>
|
|
3145
|
+
<span>60% complete - almost there!</span>
|
|
3146
|
+
</div>
|
|
3147
|
+
```
|
|
3148
|
+
|
|
3149
|
+
---
|
|
3150
|
+
|
|
3151
|
+
## 6. User Persona Quick Reference
|
|
3152
|
+
|
|
3153
|
+
### Gen Z (Born 1997-2012)
|
|
3154
|
+
|
|
3155
|
+
```
|
|
3156
|
+
CHARACTERISTICS:
|
|
3157
|
+
- Digital natives, mobile-first
|
|
3158
|
+
- Value authenticity, diversity
|
|
3159
|
+
- Short attention spans
|
|
3160
|
+
- Visual learners
|
|
3161
|
+
|
|
3162
|
+
DESIGN APPROACH:
|
|
3163
|
+
├── Colors: Vibrant, hypercolor, bold gradients
|
|
3164
|
+
├── Typography: Large, variable, experimental
|
|
3165
|
+
├── Layout: Vertical scroll, mobile-native
|
|
3166
|
+
├── Interactions: Fast, gamified, gesture-based
|
|
3167
|
+
├── Content: Short-form video, memes, stories
|
|
3168
|
+
└── Trust: Peer reviews > authority
|
|
3169
|
+
```
|
|
3170
|
+
|
|
3171
|
+
### Millennials (Born 1981-1996)
|
|
3172
|
+
|
|
3173
|
+
```
|
|
3174
|
+
CHARACTERISTICS:
|
|
3175
|
+
- Value experiences over things
|
|
3176
|
+
- Research before buying
|
|
3177
|
+
- Socially conscious
|
|
3178
|
+
- Price-sensitive but quality-aware
|
|
3179
|
+
|
|
3180
|
+
DESIGN APPROACH:
|
|
3181
|
+
├── Colors: Muted pastels, earth tones
|
|
3182
|
+
├── Typography: Clean, readable sans-serif
|
|
3183
|
+
├── Layout: Responsive, card-based
|
|
3184
|
+
├── Interactions: Smooth, purposeful animations
|
|
3185
|
+
├── Content: Value-driven, transparent
|
|
3186
|
+
└── Trust: Reviews, sustainability, values
|
|
3187
|
+
```
|
|
3188
|
+
|
|
3189
|
+
### Gen X (Born 1965-1980)
|
|
3190
|
+
|
|
3191
|
+
```
|
|
3192
|
+
CHARACTERISTICS:
|
|
3193
|
+
- Independent, self-reliant
|
|
3194
|
+
- Value efficiency
|
|
3195
|
+
- Skeptical of marketing
|
|
3196
|
+
- Balanced tech comfort
|
|
3197
|
+
|
|
3198
|
+
DESIGN APPROACH:
|
|
3199
|
+
├── Colors: Professional, trustworthy
|
|
3200
|
+
├── Typography: Familiar, conservative
|
|
3201
|
+
├── Layout: Clear hierarchy, traditional
|
|
3202
|
+
├── Interactions: Functional, not flashy
|
|
3203
|
+
├── Content: Direct, fact-based
|
|
3204
|
+
└── Trust: Expertise, track record
|
|
3205
|
+
```
|
|
3206
|
+
|
|
3207
|
+
### Baby Boomers (Born 1946-1964)
|
|
3208
|
+
|
|
3209
|
+
```
|
|
3210
|
+
CHARACTERISTICS:
|
|
3211
|
+
- Detail-oriented
|
|
3212
|
+
- Loyal when trusted
|
|
3213
|
+
- Value personal service
|
|
3214
|
+
- Less tech-confident
|
|
3215
|
+
|
|
3216
|
+
DESIGN APPROACH:
|
|
3217
|
+
├── Colors: High contrast, simple palette
|
|
3218
|
+
├── Typography: Large (18px+), high contrast
|
|
3219
|
+
├── Layout: Simple, linear, spacious
|
|
3220
|
+
├── Interactions: Minimal, clear feedback
|
|
3221
|
+
├── Content: Comprehensive, detailed
|
|
3222
|
+
└── Trust: Phone numbers, real people
|
|
3223
|
+
```
|
|
3224
|
+
|
|
3225
|
+
---
|
|
3226
|
+
|
|
3227
|
+
## 7. Emotion Color Mapping
|
|
3228
|
+
|
|
3229
|
+
```
|
|
3230
|
+
┌────────────────────────────────────────────────────┐
|
|
3231
|
+
│ EMOTION │ COLORS │ USE │
|
|
3232
|
+
├───────────────────┼───────────────────┼────────────┤
|
|
3233
|
+
│ Trust │ Blue, Green │ Finance │
|
|
3234
|
+
│ Excitement │ Red, Orange │ Sales │
|
|
3235
|
+
│ Calm │ Blue, Soft green │ Wellness │
|
|
3236
|
+
│ Luxury │ Black, Gold │ Premium │
|
|
3237
|
+
│ Creativity │ Teal, Pink │ Art │
|
|
3238
|
+
│ Energy │ Yellow, Orange │ Sports │
|
|
3239
|
+
│ Nature │ Green, Brown │ Eco │
|
|
3240
|
+
│ Happiness │ Yellow, Orange │ Kids │
|
|
3241
|
+
│ Sophistication │ Gray, Navy │ Corporate │
|
|
3242
|
+
│ Urgency │ Red │ Errors │
|
|
3243
|
+
└───────────────────┴───────────────────┴────────────┘
|
|
3244
|
+
```
|
|
3245
|
+
|
|
3246
|
+
---
|
|
3247
|
+
|
|
3248
|
+
## 8. Psychology Checklist
|
|
3249
|
+
|
|
3250
|
+
### Before Launch
|
|
3251
|
+
|
|
3252
|
+
- [ ] **Hick's Law:** No more than 7 choices in navigation. Have choices been narrowed to reduce decision fatigue?
|
|
3253
|
+
- [ ] **Fitts' Law:** Primary CTAs are large and reachable. Are the most important buttons easy to hit on mobile?
|
|
3254
|
+
- [ ] **Miller's Law:** Content is chunked appropriately. Is information grouped into digestible units of 5-7?
|
|
3255
|
+
- [ ] **Jakob's Law:** Does the site follow standard web conventions that users already understand?
|
|
3256
|
+
- [ ] **Doherty Threshold:** Does the system provide feedback within 400ms? Are skeleton screens in place?
|
|
3257
|
+
- [ ] **Tesler's Law:** Has complexity been moved from the user to the system where possible?
|
|
3258
|
+
- [ ] **Parkinson’s Law:** Are there features like "One-Click Checkout" to minimize task completion time?
|
|
3259
|
+
- [ ] **Von Restorff:** Does the primary CTA visually stand out from all other elements?
|
|
3260
|
+
- [ ] **Serial Position:** Is the most critical information at the very beginning or end of lists?
|
|
3261
|
+
- [ ] **Gestalt Laws:** Are related items physically grouped together (Proximity) or within a Card (Common Region)?
|
|
3262
|
+
- [ ] **Zeigarnik Effect:** Are there visual indicators (like progress bars) for incomplete tasks?
|
|
3263
|
+
- [ ] **Goal Gradient:** Is the user given a "head start" (e.g., 20% progress) to encourage completion?
|
|
3264
|
+
- [ ] **Peak-End Rule:** Does the final "Success" screen create a moment of delight?
|
|
3265
|
+
- [ ] **Occam’s Razor:** Have unnecessary visual or functional elements been removed?
|
|
3266
|
+
- [ ] **Aesthetic-Usability:** Is the UI high-fidelity enough to build initial user trust?
|
|
3267
|
+
- [ ] **Trust & Authority:** Are security badges, reviews, and expert certifications visible?
|
|
3268
|
+
- [ ] **Social Proof:** Are real user numbers or testimonials visible at decision points?
|
|
3269
|
+
- [ ] **Scarcity & Urgency:** If used, is the scarcity real and ethical (e.g., actual low stock)?
|
|
3270
|
+
- [ ] **Loss Aversion:** Does the copy emphasize what the user stands to keep rather than just gain?
|
|
3271
|
+
- [ ] **Anchoring:** Is the pricing presented in a way that frames the desired choice as a great value?
|
|
3272
|
+
- [ ] **Postel’s Law:** Is the system flexible enough to accept various input formats without errors?
|
|
3273
|
+
- [ ] **False-Consensus:** Has the design been tested with real users rather than just the internal team?
|
|
3274
|
+
- [ ] **Curse of Knowledge:** Is the copy free of technical jargon and easy for a beginner to understand?
|
|
3275
|
+
- [ ] **Stepping Stone:** Does the funnel start with low-friction tasks (e.g., email only)?
|
|
3276
|
+
- [ ] **Cognitive Load:** Is extraneous visual noise minimized to keep the interface clean?
|
|
3277
|
+
- [ ] **Emotional Design:** Does the color palette and imagery evoke the intended visceral reaction?
|
|
3278
|
+
- [ ] **Feedback:** Do all interactive elements have immediate hover, active, and success states?
|
|
3279
|
+
- [ ] **Accessibility:** Is the contrast ratio sufficient, and is the site navigable via keyboard/screen reader?
|
|
3280
|
+
- [ ] **Prägnanz:** Are icons and shapes simple enough to be recognized at a glance?
|
|
3281
|
+
- [ ] **Figure/Ground:** Is it clear which element is in focus (e.g., using shadows or scrims for modals)?
|
|
3282
|
+
|
|
3283
|
+
|
|
3284
|
+
|
|
3285
|
+
---
|
|
3286
|
+
# Content from visual-effects.md
|
|
3287
|
+
|
|
3288
|
+
# Visual Effects Reference
|
|
3289
|
+
|
|
3290
|
+
> Modern CSS effect principles and techniques - learn the concepts, create variations.
|
|
3291
|
+
> **No fixed values to copy - understand the patterns.**
|
|
3292
|
+
|
|
3293
|
+
---
|
|
3294
|
+
|
|
3295
|
+
## 1. Glassmorphism Principles
|
|
3296
|
+
|
|
3297
|
+
### What Makes Glassmorphism Work
|
|
3298
|
+
|
|
3299
|
+
```
|
|
3300
|
+
Key Properties:
|
|
3301
|
+
├── Semi-transparent background (not solid)
|
|
3302
|
+
├── Backdrop blur (frosted glass effect)
|
|
3303
|
+
├── Subtle border (for definition)
|
|
3304
|
+
└── Often: light shadow for depth
|
|
3305
|
+
```
|
|
3306
|
+
|
|
3307
|
+
### The Pattern (Customize Values)
|
|
3308
|
+
|
|
3309
|
+
```css
|
|
3310
|
+
.glass {
|
|
3311
|
+
/* Transparency: adjust opacity based on content readability */
|
|
3312
|
+
background: rgba(R, G, B, OPACITY);
|
|
3313
|
+
/* OPACITY: 0.1-0.3 for dark bg, 0.5-0.8 for light bg */
|
|
3314
|
+
|
|
3315
|
+
/* Blur: higher = more frosted */
|
|
3316
|
+
backdrop-filter: blur(AMOUNT);
|
|
3317
|
+
/* AMOUNT: 8-12px subtle, 16-24px strong */
|
|
3318
|
+
|
|
3319
|
+
/* Border: defines edges */
|
|
3320
|
+
border: 1px solid rgba(255, 255, 255, OPACITY);
|
|
3321
|
+
/* OPACITY: 0.1-0.3 typically */
|
|
3322
|
+
|
|
3323
|
+
/* Radius: match your design system */
|
|
3324
|
+
border-radius: YOUR_RADIUS;
|
|
3325
|
+
}
|
|
3326
|
+
```
|
|
3327
|
+
|
|
3328
|
+
### When to Use Glassmorphism
|
|
3329
|
+
- ✅ Over colorful/image backgrounds
|
|
3330
|
+
- ✅ Modals, overlays, cards
|
|
3331
|
+
- ✅ Navigation bars with scrolling content behind
|
|
3332
|
+
- ❌ Text-heavy content (readability issues)
|
|
3333
|
+
- ❌ Simple solid backgrounds (pointless)
|
|
3334
|
+
|
|
3335
|
+
### When NOT to Use
|
|
3336
|
+
- Low contrast situations
|
|
3337
|
+
- Accessibility-critical content
|
|
3338
|
+
- Performance-constrained devices
|
|
3339
|
+
|
|
3340
|
+
---
|
|
3341
|
+
|
|
3342
|
+
## 2. Neomorphism Principles
|
|
3343
|
+
|
|
3344
|
+
### What Makes Neomorphism Work
|
|
3345
|
+
|
|
3346
|
+
```
|
|
3347
|
+
Key Concept: Soft, extruded elements using DUAL shadows
|
|
3348
|
+
├── Light shadow (from light source direction)
|
|
3349
|
+
├── Dark shadow (opposite direction)
|
|
3350
|
+
└── Background matches surrounding (same color)
|
|
3351
|
+
```
|
|
3352
|
+
|
|
3353
|
+
### The Pattern
|
|
3354
|
+
|
|
3355
|
+
```css
|
|
3356
|
+
.neo-raised {
|
|
3357
|
+
/* Background MUST match parent */
|
|
3358
|
+
background: SAME_AS_PARENT;
|
|
3359
|
+
|
|
3360
|
+
/* Two shadows: light direction + dark direction */
|
|
3361
|
+
box-shadow:
|
|
3362
|
+
OFFSET OFFSET BLUR rgba(light-color),
|
|
3363
|
+
-OFFSET -OFFSET BLUR rgba(dark-color);
|
|
3364
|
+
|
|
3365
|
+
/* OFFSET: typically 6-12px */
|
|
3366
|
+
/* BLUR: typically 12-20px */
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
.neo-pressed {
|
|
3370
|
+
/* Inset creates "pushed in" effect */
|
|
3371
|
+
box-shadow:
|
|
3372
|
+
inset OFFSET OFFSET BLUR rgba(dark-color),
|
|
3373
|
+
inset -OFFSET -OFFSET BLUR rgba(light-color);
|
|
3374
|
+
}
|
|
3375
|
+
```
|
|
3376
|
+
|
|
3377
|
+
### Accessibility Warning
|
|
3378
|
+
⚠️ **Low contrast** - use sparingly, ensure clear boundaries
|
|
3379
|
+
|
|
3380
|
+
### When to Use
|
|
3381
|
+
- Decorative elements
|
|
3382
|
+
- Subtle interactive states
|
|
3383
|
+
- Minimalist UI with flat colors
|
|
3384
|
+
|
|
3385
|
+
---
|
|
3386
|
+
|
|
3387
|
+
## 3. Shadow Hierarchy Principles
|
|
3388
|
+
|
|
3389
|
+
### Concept: Shadows Indicate Elevation
|
|
3390
|
+
|
|
3391
|
+
```
|
|
3392
|
+
Higher elevation = larger shadow
|
|
3393
|
+
├── Level 0: No shadow (flat on surface)
|
|
3394
|
+
├── Level 1: Subtle shadow (slightly raised)
|
|
3395
|
+
├── Level 2: Medium shadow (cards, buttons)
|
|
3396
|
+
├── Level 3: Large shadow (modals, dropdowns)
|
|
3397
|
+
└── Level 4: Deep shadow (floating elements)
|
|
3398
|
+
```
|
|
3399
|
+
|
|
3400
|
+
### Shadow Properties to Adjust
|
|
3401
|
+
|
|
3402
|
+
```css
|
|
3403
|
+
box-shadow: OFFSET-X OFFSET-Y BLUR SPREAD COLOR;
|
|
3404
|
+
|
|
3405
|
+
/* Offset: direction of shadow */
|
|
3406
|
+
/* Blur: softness (larger = softer) */
|
|
3407
|
+
/* Spread: size expansion */
|
|
3408
|
+
/* Color: typically black with low opacity */
|
|
3409
|
+
```
|
|
3410
|
+
|
|
3411
|
+
### Principles for Natural Shadows
|
|
3412
|
+
|
|
3413
|
+
1. **Y-offset larger than X** (light comes from above)
|
|
3414
|
+
2. **Low opacity** (5-15% for subtle, 15-25% for pronounced)
|
|
3415
|
+
3. **Multiple layers** for realism (ambient + direct)
|
|
3416
|
+
4. **Blur scales with offset** (larger offset = larger blur)
|
|
3417
|
+
|
|
3418
|
+
### Dark Mode Shadows
|
|
3419
|
+
- Shadows less visible on dark backgrounds
|
|
3420
|
+
- May need to increase opacity
|
|
3421
|
+
- Or use glow/highlight instead
|
|
3422
|
+
|
|
3423
|
+
---
|
|
3424
|
+
|
|
3425
|
+
## 4. Gradient Principles
|
|
3426
|
+
|
|
3427
|
+
### Types and When to Use
|
|
3428
|
+
|
|
3429
|
+
| Type | Pattern | Use Case |
|
|
3430
|
+
|------|---------|----------|
|
|
3431
|
+
| **Linear** | Color A → Color B along line | Backgrounds, buttons, headers |
|
|
3432
|
+
| **Radial** | Center → outward | Spotlights, focal points |
|
|
3433
|
+
| **Conic** | Around center | Pie charts, creative effects |
|
|
3434
|
+
|
|
3435
|
+
### Creating Harmonious Gradients
|
|
3436
|
+
|
|
3437
|
+
```
|
|
3438
|
+
Good Gradient Rules:
|
|
3439
|
+
├── Use ADJACENT colors on wheel (analogous)
|
|
3440
|
+
├── Or same hue with different lightness
|
|
3441
|
+
├── Avoid complementary (can look harsh)
|
|
3442
|
+
└── Add middle stops for smoother transitions
|
|
3443
|
+
```
|
|
3444
|
+
|
|
3445
|
+
### Gradient Syntax Pattern
|
|
3446
|
+
|
|
3447
|
+
```css
|
|
3448
|
+
.gradient {
|
|
3449
|
+
background: linear-gradient(
|
|
3450
|
+
DIRECTION, /* angle or to-keyword */
|
|
3451
|
+
COLOR-STOP-1, /* color + optional position */
|
|
3452
|
+
COLOR-STOP-2,
|
|
3453
|
+
/* ... more stops */
|
|
3454
|
+
);
|
|
3455
|
+
}
|
|
3456
|
+
|
|
3457
|
+
/* DIRECTION examples: */
|
|
3458
|
+
/* 90deg, 135deg, to right, to bottom right */
|
|
3459
|
+
```
|
|
3460
|
+
|
|
3461
|
+
### Mesh Gradients
|
|
3462
|
+
|
|
3463
|
+
```
|
|
3464
|
+
Multiple radial gradients overlapped:
|
|
3465
|
+
├── Each at different position
|
|
3466
|
+
├── Each with transparent falloff
|
|
3467
|
+
├── **Mandatory for "Wow" factor in Hero sections**
|
|
3468
|
+
└── Creates organic, colorful effect (Search: "Aurora Gradient CSS")
|
|
3469
|
+
```
|
|
3470
|
+
|
|
3471
|
+
---
|
|
3472
|
+
|
|
3473
|
+
## 5. Border Effects Principles
|
|
3474
|
+
|
|
3475
|
+
### Gradient Borders
|
|
3476
|
+
|
|
3477
|
+
```
|
|
3478
|
+
Technique: Pseudo-element with gradient background
|
|
3479
|
+
├── Element has padding = border width
|
|
3480
|
+
├── Pseudo-element fills with gradient
|
|
3481
|
+
└── Mask or clip creates border effect
|
|
3482
|
+
```
|
|
3483
|
+
|
|
3484
|
+
### Animated Borders
|
|
3485
|
+
|
|
3486
|
+
```
|
|
3487
|
+
Technique: Rotating gradient or conic sweep
|
|
3488
|
+
├── Pseudo-element larger than content
|
|
3489
|
+
├── Animation rotates the gradient
|
|
3490
|
+
└── Overflow hidden clips to shape
|
|
3491
|
+
```
|
|
3492
|
+
|
|
3493
|
+
### Glow Borders
|
|
3494
|
+
|
|
3495
|
+
```css
|
|
3496
|
+
/* Multiple box-shadows create glow */
|
|
3497
|
+
box-shadow:
|
|
3498
|
+
0 0 SMALL-BLUR COLOR,
|
|
3499
|
+
0 0 MEDIUM-BLUR COLOR,
|
|
3500
|
+
0 0 LARGE-BLUR COLOR;
|
|
3501
|
+
|
|
3502
|
+
/* Each layer adds to the glow */
|
|
3503
|
+
```
|
|
3504
|
+
|
|
3505
|
+
---
|
|
3506
|
+
|
|
3507
|
+
## 6. Glow Effects Principles
|
|
3508
|
+
|
|
3509
|
+
### Text Glow
|
|
3510
|
+
|
|
3511
|
+
```css
|
|
3512
|
+
text-shadow:
|
|
3513
|
+
0 0 BLUR-1 COLOR,
|
|
3514
|
+
0 0 BLUR-2 COLOR,
|
|
3515
|
+
0 0 BLUR-3 COLOR;
|
|
3516
|
+
|
|
3517
|
+
/* Multiple layers = stronger glow */
|
|
3518
|
+
/* Larger blur = softer spread */
|
|
3519
|
+
```
|
|
3520
|
+
|
|
3521
|
+
### Element Glow
|
|
3522
|
+
|
|
3523
|
+
```css
|
|
3524
|
+
box-shadow:
|
|
3525
|
+
0 0 BLUR-1 COLOR,
|
|
3526
|
+
0 0 BLUR-2 COLOR;
|
|
3527
|
+
|
|
3528
|
+
/* Use color matching element for realistic glow */
|
|
3529
|
+
/* Lower opacity for subtle, higher for neon */
|
|
3530
|
+
```
|
|
3531
|
+
|
|
3532
|
+
### Pulsing Glow Animation
|
|
3533
|
+
|
|
3534
|
+
```css
|
|
3535
|
+
@keyframes glow-pulse {
|
|
3536
|
+
0%, 100% { box-shadow: 0 0 SMALL-BLUR COLOR; }
|
|
3537
|
+
50% { box-shadow: 0 0 LARGE-BLUR COLOR; }
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
/* Easing and duration affect feel */
|
|
3541
|
+
```
|
|
3542
|
+
|
|
3543
|
+
---
|
|
3544
|
+
|
|
3545
|
+
## 7. Overlay Techniques
|
|
3546
|
+
|
|
3547
|
+
### Gradient Overlay on Images
|
|
3548
|
+
|
|
3549
|
+
```
|
|
3550
|
+
Purpose: Improve text readability over images
|
|
3551
|
+
Pattern: Gradient from transparent to opaque
|
|
3552
|
+
Position: Where text will appear
|
|
3553
|
+
```
|
|
3554
|
+
|
|
3555
|
+
```css
|
|
3556
|
+
.overlay::after {
|
|
3557
|
+
content: '';
|
|
3558
|
+
position: absolute;
|
|
3559
|
+
inset: 0;
|
|
3560
|
+
background: linear-gradient(
|
|
3561
|
+
DIRECTION,
|
|
3562
|
+
transparent PERCENTAGE,
|
|
3563
|
+
rgba(0,0,0,OPACITY) 100%
|
|
3564
|
+
);
|
|
3565
|
+
}
|
|
3566
|
+
```
|
|
3567
|
+
|
|
3568
|
+
### Colored Overlay
|
|
3569
|
+
|
|
3570
|
+
```css
|
|
3571
|
+
/* Blend mode or layered gradient */
|
|
3572
|
+
background:
|
|
3573
|
+
linear-gradient(YOUR-COLOR-WITH-OPACITY),
|
|
3574
|
+
url('image.jpg');
|
|
3575
|
+
```
|
|
3576
|
+
|
|
3577
|
+
---
|
|
3578
|
+
|
|
3579
|
+
## 8. Modern CSS Techniques
|
|
3580
|
+
|
|
3581
|
+
### Container Queries (Concept)
|
|
3582
|
+
|
|
3583
|
+
```
|
|
3584
|
+
Instead of viewport breakpoints:
|
|
3585
|
+
├── Component responds to ITS container
|
|
3586
|
+
├── Truly modular, reusable components
|
|
3587
|
+
└── Syntax: @container (condition) { }
|
|
3588
|
+
```
|
|
3589
|
+
|
|
3590
|
+
### :has() Selector (Concept)
|
|
3591
|
+
|
|
3592
|
+
```
|
|
3593
|
+
Parent styling based on children:
|
|
3594
|
+
├── "Parent that has X child"
|
|
3595
|
+
├── Enables previously impossible patterns
|
|
3596
|
+
└── Progressive enhancement approach
|
|
3597
|
+
```
|
|
3598
|
+
|
|
3599
|
+
### Scroll-Driven Animations (Concept)
|
|
3600
|
+
|
|
3601
|
+
```
|
|
3602
|
+
Animation progress tied to scroll:
|
|
3603
|
+
├── Entry/exit animations on scroll
|
|
3604
|
+
├── Parallax effects
|
|
3605
|
+
├── Progress indicators
|
|
3606
|
+
└── View-based or scroll-based timeline
|
|
3607
|
+
```
|
|
3608
|
+
|
|
3609
|
+
---
|
|
3610
|
+
|
|
3611
|
+
## 9. Performance Principles
|
|
3612
|
+
|
|
3613
|
+
### GPU-Accelerated Properties
|
|
3614
|
+
|
|
3615
|
+
```
|
|
3616
|
+
CHEAP to animate (GPU):
|
|
3617
|
+
├── transform (translate, scale, rotate)
|
|
3618
|
+
└── opacity
|
|
3619
|
+
|
|
3620
|
+
EXPENSIVE to animate (CPU):
|
|
3621
|
+
├── width, height
|
|
3622
|
+
├── top, left, right, bottom
|
|
3623
|
+
├── margin, padding
|
|
3624
|
+
└── box-shadow (recalculates)
|
|
3625
|
+
```
|
|
3626
|
+
|
|
3627
|
+
### will-change Usage
|
|
3628
|
+
|
|
3629
|
+
```css
|
|
3630
|
+
/* Use sparingly, only for heavy animations */
|
|
3631
|
+
.heavy-animation {
|
|
3632
|
+
will-change: transform;
|
|
3633
|
+
}
|
|
3634
|
+
|
|
3635
|
+
/* Remove after animation if possible */
|
|
3636
|
+
```
|
|
3637
|
+
|
|
3638
|
+
### Reduced Motion
|
|
3639
|
+
|
|
3640
|
+
```css
|
|
3641
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3642
|
+
/* Disable or minimize animations */
|
|
3643
|
+
/* Respect user preference */
|
|
3644
|
+
}
|
|
3645
|
+
```
|
|
3646
|
+
|
|
3647
|
+
---
|
|
3648
|
+
|
|
3649
|
+
## 10. Effect Selection Checklist
|
|
3650
|
+
|
|
3651
|
+
Before applying any effect:
|
|
3652
|
+
|
|
3653
|
+
- [ ] **Does it serve a purpose?** (not just decoration)
|
|
3654
|
+
- [ ] **Is it appropriate for the context?** (brand, audience)
|
|
3655
|
+
- [ ] **Have you varied from previous projects?** (avoid repetition)
|
|
3656
|
+
- [ ] **Is it accessible?** (contrast, motion sensitivity)
|
|
3657
|
+
- [ ] **Is it performant?** (especially on mobile)
|
|
3658
|
+
- [ ] **Did you ask user preference?** (if style open-ended)
|
|
3659
|
+
|
|
3660
|
+
### Anti-Patterns
|
|
3661
|
+
|
|
3662
|
+
- ❌ Glassmorphism on every element (kitsch)
|
|
3663
|
+
- ❌ Dark + neon as default (lazy AI look)
|
|
3664
|
+
- ❌ **Static/Flat designs with no depth (FAILED)**
|
|
3665
|
+
- ❌ Effects that hurt readability
|
|
3666
|
+
- ❌ Animations without purpose
|
|
3667
|
+
|
|
3668
|
+
---
|
|
3669
|
+
|
|
3670
|
+
> **Remember**: Effects enhance meaning. Choose based on purpose and context, not because it "looks cool."
|