mobileui-os 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/AGENTS.md +47 -0
- package/CHANGELOG.md +25 -0
- package/README.md +78 -0
- package/bin/cli.mjs +375 -0
- package/knowledge/android/00-apple-to-android-adaption.md +1499 -0
- package/knowledge/android/accessibility.md +333 -0
- package/knowledge/android/components-controls.md +270 -0
- package/knowledge/android/material-design-3.md +174 -0
- package/knowledge/android/navigation-patterns.md +212 -0
- package/knowledge/apple/00-skill-reading-protocol.md +1296 -0
- package/knowledge/apple/Accessibility, Inclusive Design & Human Factors Intelligence.md +735 -0
- package/knowledge/apple/Advanced Interaction Patterns, Gestures, Feedback & State Transitions.md +1140 -0
- package/knowledge/apple/Advanced Navigation, Information Architecture & Wayfinding.md +551 -0
- package/knowledge/apple/Autonomus Ui-UX Improvement Loop.md +611 -0
- package/knowledge/apple/Color, Materials, Contrast, Themes & Visual Depth.md +1351 -0
- package/knowledge/apple/Content, Copy, Microinteractions & UX Communication.md +642 -0
- package/knowledge/apple/Data-Heavy Interfaces, Tables, Lists, Search, Filtering & Large-Scale Content.md +721 -0
- package/knowledge/apple/Design Systems & Component Architecture.md +412 -0
- package/knowledge/apple/Forms, Input, Data Entry & Validation Intelligence.md +705 -0
- package/knowledge/apple/Interaction, State & Edge-Case Engineering.md +491 -0
- package/knowledge/apple/Interaction-behaviour.md +1378 -0
- package/knowledge/apple/Layout Architecture, Responsive Design & Spatial Systems.md +1365 -0
- package/knowledge/apple/MASTER UI-UX ORCHESTRATOR.md +1210 -0
- package/knowledge/apple/Navigation Architecture, Routing, Deep Linking & State Restoration.md +1392 -0
- package/knowledge/apple/Navigation, Information Architecture & Spatial Hierarchy.md +1613 -0
- package/knowledge/apple/Notifications, Permissions, Privacy and Trust.md +1540 -0
- package/knowledge/apple/Patterns-templates-composition.md +647 -0
- package/knowledge/apple/Performance, Perceived Speed, Motion & Rendering Intelligence.md +855 -0
- package/knowledge/apple/Responsive, Adaptive & Cross-Platform UI Intelligence.md +669 -0
- package/knowledge/apple/Responsive, Adaptive, Accessible & Performant UI.md +545 -0
- package/knowledge/apple/Tablet Adaptation & Multi-Device UX.md +1447 -0
- package/knowledge/apple/UI Implementation & Refactoring.md +498 -0
- package/knowledge/apple/UI-UX Decision-Making, Prioritization & Trade-offs.md +533 -0
- package/knowledge/apple/UI-UX Project Lifecycle & Delivery.md +544 -0
- package/knowledge/apple/User Flows & Experience Architecture.md +335 -0
- package/knowledge/apple/Visual Design Systems, Theming, Tokens & Brand Intelligence.md +764 -0
- package/knowledge/apple/Visual QA, Testing & Validation.md +557 -0
- package/knowledge/apple/accessibility-inclusive-interaction.md +1361 -0
- package/knowledge/apple/accessibility.md +2162 -0
- package/knowledge/apple/color.md +1933 -0
- package/knowledge/apple/component-architecture.md +2208 -0
- package/knowledge/apple/components.md +2172 -0
- package/knowledge/apple/design-decision-framework.md +1883 -0
- package/knowledge/apple/design-review-engine.md +2108 -0
- package/knowledge/apple/design-tokens.md +1943 -0
- package/knowledge/apple/designing-for-ios.md +1680 -0
- package/knowledge/apple/gestures, touch behavior, feedback, motion, and micro-interactions.md +1538 -0
- package/knowledge/apple/hig-foundation.md +1806 -0
- package/knowledge/apple/iconography.md +1903 -0
- package/knowledge/apple/interaction-patterns.md +2513 -0
- package/knowledge/apple/interaction.md +2141 -0
- package/knowledge/apple/ios-alerts-confirmations-destructive-actions.md +1342 -0
- package/knowledge/apple/ios-components-and-controls.md +1634 -0
- package/knowledge/apple/ios-components-patterns.md +1343 -0
- package/knowledge/apple/ios-design-system-architecture.md +1520 -0
- package/knowledge/apple/ios-empty-error-offline-states.md +1370 -0
- package/knowledge/apple/ios-empty-loading-error-recovery.md +1674 -0
- package/knowledge/apple/ios-forms-and-input.md +1458 -0
- package/knowledge/apple/ios-forms-input-data-entry.md +1308 -0
- package/knowledge/apple/ios-gestures-and-touch.md +1272 -0
- package/knowledge/apple/ios-lists-collections-and-data-display.md +1735 -0
- package/knowledge/apple/ios-loading-progress-async-states.md +1378 -0
- package/knowledge/apple/ios-materials-and-surfaces.md +1543 -0
- package/knowledge/apple/ios-motion-animation-transitions.md +1178 -0
- package/knowledge/apple/ios-navigation-and-information-architecture.md +1674 -0
- package/knowledge/apple/ios-navigation-user-flows-design-architecture.md +1195 -0
- package/knowledge/apple/ios-search-and-discovery.md +1456 -0
- package/knowledge/apple/ios-search-filtering-discovery.md +1402 -0
- package/knowledge/apple/ios-sheets-modals-popovers.md +1205 -0
- package/knowledge/apple/ios-typography-icons-visual-hierarchy.md +1431 -0
- package/knowledge/apple/layout.md +2331 -0
- package/knowledge/apple/media-centric-content-ui-patterns.md +1470 -0
- package/knowledge/apple/motion, transitions, physics, and animation language.md +1535 -0
- package/knowledge/apple/motion-and-animation.md +1698 -0
- package/knowledge/apple/motion.md +2087 -0
- package/knowledge/apple/navigation.md +2281 -0
- package/knowledge/apple/responsive-adaptive.md +2159 -0
- package/knowledge/apple/screen-architecture.md +2067 -0
- package/knowledge/apple/typography, Content Hierarchy & Readability.md +1411 -0
- package/knowledge/apple/typography.md +1802 -0
- package/knowledge/apple/ui-ux inteligence audit.md +106 -0
- package/knowledge/apple/visual-design-and-premium-ui.md +1555 -0
- package/knowledge/apple/visual-hierarchy-engine.md +1647 -0
- package/knowledge/apple/visual-materials.md +2189 -0
- package/package.json +53 -0
- package/principles/design-principles.md +37 -0
- package/principles/platform-principles.md +25 -0
- package/principles/ux-principles.md +16 -0
- package/references/official-links.md +11 -0
- package/skills/accessibility-engineer/SKILL.md +125 -0
- package/skills/analytics-engineer/SKILL.md +283 -0
- package/skills/animation-engineer/SKILL.md +316 -0
- package/skills/component-designer/SKILL.md +75 -0
- package/skills/component-library-engineer/SKILL.md +140 -0
- package/skills/component-library-ops/SKILL.md +155 -0
- package/skills/design-system/SKILL.md +77 -0
- package/skills/design-token-engineer/SKILL.md +203 -0
- package/skills/design-token-pipeline/SKILL.md +277 -0
- package/skills/device-lab-engineer/SKILL.md +387 -0
- package/skills/forms-engineer/SKILL.md +79 -0
- package/skills/internationalization-engineer/SKILL.md +256 -0
- package/skills/motion-designer/SKILL.md +77 -0
- package/skills/native-data-fetching/SKILL.md +50 -0
- package/skills/navigation-architect/SKILL.md +65 -0
- package/skills/performance-engineer/SKILL.md +250 -0
- package/skills/platform-specialist/SKILL.md +95 -0
- package/skills/pre-release-gate/SKILL.md +75 -0
- package/skills/screen-designer/SKILL.md +117 -0
- package/skills/security-engineer/SKILL.md +375 -0
- package/skills/skills.json +134 -0
- package/skills/testing-auditor/SKILL.md +62 -0
- package/skills/ui-architect/SKILL.md +86 -0
- package/skills/ui-implementer/SKILL.md +188 -0
- package/skills/ux-architect/SKILL.md +49 -0
- package/skills/ux-auditor/SKILL.md +52 -0
- package/skills/visual-auditor/SKILL.md +71 -0
- package/templates/audit-report.md +29 -0
- package/templates/design-tokens.ts +33 -0
- package/templates/screen-spec.md +61 -0
- package/workflows/new-screen.md +17 -0
- package/workflows/pre-release.md +21 -0
- package/workflows/redesign.md +14 -0
- package/workflows/ui-audit.md +22 -0
|
@@ -0,0 +1,2331 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
````md
|
|
4
|
+
# Apple Layout Intelligence
|
|
5
|
+
|
|
6
|
+
> Agent knowledge module for constructing, evaluating, and adapting mobile
|
|
7
|
+
> layouts using Apple's spatial design principles.
|
|
8
|
+
|
|
9
|
+
Version: 1.0
|
|
10
|
+
Platform: iOS / iPadOS
|
|
11
|
+
Role: Layout intelligence
|
|
12
|
+
Parent: knowledge/apple/designing-for-ios.md
|
|
13
|
+
Use with: MobileUI-OS
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# 1. PURPOSE
|
|
18
|
+
|
|
19
|
+
Layout is the spatial structure of an interface.
|
|
20
|
+
|
|
21
|
+
It determines:
|
|
22
|
+
|
|
23
|
+
- what users notice first
|
|
24
|
+
- what belongs together
|
|
25
|
+
- what is separate
|
|
26
|
+
- how content flows
|
|
27
|
+
- how actions are discovered
|
|
28
|
+
- how comfortable the interface feels
|
|
29
|
+
- how the interface adapts to different devices
|
|
30
|
+
|
|
31
|
+
A strong layout is not simply visually balanced.
|
|
32
|
+
|
|
33
|
+
It communicates relationships.
|
|
34
|
+
|
|
35
|
+
The agent must therefore treat layout as an information architecture problem,
|
|
36
|
+
not merely a positioning problem.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
# 2. CORE PRINCIPLE
|
|
41
|
+
|
|
42
|
+
Do not begin layout design with:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
Where should I put this button?
|
|
46
|
+
````
|
|
47
|
+
|
|
48
|
+
Begin with:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
What information and actions belong together?
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Then:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
What is most important?
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Then:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
How should that hierarchy be represented spatially?
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The correct sequence is:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
USER GOAL
|
|
70
|
+
↓
|
|
71
|
+
CONTENT STRUCTURE
|
|
72
|
+
↓
|
|
73
|
+
INFORMATION HIERARCHY
|
|
74
|
+
↓
|
|
75
|
+
GROUPING
|
|
76
|
+
↓
|
|
77
|
+
SPACING
|
|
78
|
+
↓
|
|
79
|
+
ALIGNMENT
|
|
80
|
+
↓
|
|
81
|
+
CONTAINMENT
|
|
82
|
+
↓
|
|
83
|
+
ADAPTATION
|
|
84
|
+
↓
|
|
85
|
+
VISUAL REFINEMENT
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
# 3. LAYOUT IS COMMUNICATION
|
|
91
|
+
|
|
92
|
+
Users interpret spatial relationships.
|
|
93
|
+
|
|
94
|
+
For example:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
Title
|
|
98
|
+
Subtitle
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
with tight spacing communicates:
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
These belong together.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
While:
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
Title
|
|
111
|
+
Subtitle
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
New Section
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
communicates:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
A new conceptual group begins here.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Therefore spacing is semantic.
|
|
124
|
+
|
|
125
|
+
Do not treat spacing as decoration.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
# 4. INFORMATION HIERARCHY FIRST
|
|
130
|
+
|
|
131
|
+
Before placing components, classify information.
|
|
132
|
+
|
|
133
|
+
A useful model:
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
LEVEL 0
|
|
137
|
+
System / environment
|
|
138
|
+
|
|
139
|
+
LEVEL 1
|
|
140
|
+
Screen identity
|
|
141
|
+
|
|
142
|
+
LEVEL 2
|
|
143
|
+
Primary content
|
|
144
|
+
|
|
145
|
+
LEVEL 3
|
|
146
|
+
Primary action
|
|
147
|
+
|
|
148
|
+
LEVEL 4
|
|
149
|
+
Secondary information
|
|
150
|
+
|
|
151
|
+
LEVEL 5
|
|
152
|
+
Secondary actions
|
|
153
|
+
|
|
154
|
+
LEVEL 6
|
|
155
|
+
Advanced / contextual actions
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Not every screen needs all levels.
|
|
159
|
+
|
|
160
|
+
The agent must determine the appropriate hierarchy from the task.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
# 5. PRIMARY CONTENT
|
|
165
|
+
|
|
166
|
+
Primary content should receive the strongest usable area.
|
|
167
|
+
|
|
168
|
+
Examples:
|
|
169
|
+
|
|
170
|
+
Music player:
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
Artwork
|
|
174
|
+
Track information
|
|
175
|
+
Playback state
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Document editor:
|
|
179
|
+
|
|
180
|
+
```text
|
|
181
|
+
Document content
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Photo viewer:
|
|
185
|
+
|
|
186
|
+
```text
|
|
187
|
+
Image
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Calculator:
|
|
191
|
+
|
|
192
|
+
```text
|
|
193
|
+
Expression
|
|
194
|
+
Result
|
|
195
|
+
Keypad
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Do not allow navigation, decoration, or secondary controls to consume
|
|
199
|
+
space needed by the primary task.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
# 6. SCREEN COMPOSITION
|
|
204
|
+
|
|
205
|
+
A mobile screen can be conceptually divided into:
|
|
206
|
+
|
|
207
|
+
```text
|
|
208
|
+
┌──────────────────────────┐
|
|
209
|
+
│ System / Safe Area │
|
|
210
|
+
├──────────────────────────┤
|
|
211
|
+
│ Navigation / Context │
|
|
212
|
+
├──────────────────────────┤
|
|
213
|
+
│ │
|
|
214
|
+
│ Primary Content │
|
|
215
|
+
│ │
|
|
216
|
+
│ │
|
|
217
|
+
├──────────────────────────┤
|
|
218
|
+
│ Contextual / Secondary │
|
|
219
|
+
├──────────────────────────┤
|
|
220
|
+
│ Primary Navigation / │
|
|
221
|
+
│ Primary Actions │
|
|
222
|
+
├──────────────────────────┤
|
|
223
|
+
│ System Safe Area │
|
|
224
|
+
└──────────────────────────┘
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
This is a conceptual model.
|
|
228
|
+
|
|
229
|
+
Do not force every screen into this exact structure.
|
|
230
|
+
|
|
231
|
+
Some screens may use:
|
|
232
|
+
|
|
233
|
+
* full-bleed media
|
|
234
|
+
* immersive content
|
|
235
|
+
* floating controls
|
|
236
|
+
* bottom sheets
|
|
237
|
+
* edge-to-edge imagery
|
|
238
|
+
* split views
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
# 7. SAFE AREA VS VISUAL AREA
|
|
243
|
+
|
|
244
|
+
Separate:
|
|
245
|
+
|
|
246
|
+
```text
|
|
247
|
+
visual canvas
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
from:
|
|
251
|
+
|
|
252
|
+
```text
|
|
253
|
+
interactive content region
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
A background image may extend behind system regions.
|
|
257
|
+
|
|
258
|
+
A primary control may need to remain inside a safe interactive region.
|
|
259
|
+
|
|
260
|
+
Therefore:
|
|
261
|
+
|
|
262
|
+
```text
|
|
263
|
+
Background:
|
|
264
|
+
may extend
|
|
265
|
+
|
|
266
|
+
Content:
|
|
267
|
+
must remain readable
|
|
268
|
+
|
|
269
|
+
Interactive controls:
|
|
270
|
+
must remain usable
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
# 8. EDGE-TO-EDGE DESIGN
|
|
276
|
+
|
|
277
|
+
Modern mobile interfaces frequently use edge-to-edge composition.
|
|
278
|
+
|
|
279
|
+
Edge-to-edge does NOT mean:
|
|
280
|
+
|
|
281
|
+
```text
|
|
282
|
+
Put everything against the edges.
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
It means the visual composition can use the full physical display while
|
|
286
|
+
respecting system UI and interaction constraints.
|
|
287
|
+
|
|
288
|
+
Use edge-to-edge intentionally for:
|
|
289
|
+
|
|
290
|
+
* media
|
|
291
|
+
* imagery
|
|
292
|
+
* maps
|
|
293
|
+
* immersive content
|
|
294
|
+
* backgrounds
|
|
295
|
+
* visual storytelling
|
|
296
|
+
|
|
297
|
+
Be more conservative with:
|
|
298
|
+
|
|
299
|
+
* critical controls
|
|
300
|
+
* text
|
|
301
|
+
* input
|
|
302
|
+
* destructive actions
|
|
303
|
+
* navigation elements
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
# 9. MARGINS
|
|
308
|
+
|
|
309
|
+
Margins define the relationship between content and the screen/container edge.
|
|
310
|
+
|
|
311
|
+
The agent should establish a consistent horizontal content boundary.
|
|
312
|
+
|
|
313
|
+
Avoid:
|
|
314
|
+
|
|
315
|
+
```text
|
|
316
|
+
Title ← 17px
|
|
317
|
+
Paragraph ← 24px
|
|
318
|
+
Button ← 13px
|
|
319
|
+
List ← 20px
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
unless the differences are intentional.
|
|
323
|
+
|
|
324
|
+
Prefer a semantic system.
|
|
325
|
+
|
|
326
|
+
Example:
|
|
327
|
+
|
|
328
|
+
```text
|
|
329
|
+
screen.horizontal
|
|
330
|
+
section.horizontal
|
|
331
|
+
content.horizontal
|
|
332
|
+
compact.horizontal
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
The actual values belong to the project's design tokens.
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
# 10. MARGIN CONSISTENCY
|
|
340
|
+
|
|
341
|
+
Repeated content should generally share alignment.
|
|
342
|
+
|
|
343
|
+
Example:
|
|
344
|
+
|
|
345
|
+
```text
|
|
346
|
+
Title
|
|
347
|
+
Description
|
|
348
|
+
List
|
|
349
|
+
Section heading
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
should not appear to randomly start at:
|
|
353
|
+
|
|
354
|
+
```text
|
|
355
|
+
16
|
|
356
|
+
22
|
|
357
|
+
19
|
|
358
|
+
27
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
pixels.
|
|
362
|
+
|
|
363
|
+
Alignment establishes visual order.
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
# 11. ALIGNMENT
|
|
368
|
+
|
|
369
|
+
Alignment is one of the strongest tools for making interfaces feel polished.
|
|
370
|
+
|
|
371
|
+
Common alignment strategies:
|
|
372
|
+
|
|
373
|
+
```text
|
|
374
|
+
leading
|
|
375
|
+
center
|
|
376
|
+
trailing
|
|
377
|
+
baseline
|
|
378
|
+
edge
|
|
379
|
+
grid
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
## Agent rule
|
|
383
|
+
|
|
384
|
+
Choose alignment based on semantic relationships.
|
|
385
|
+
|
|
386
|
+
Do not center everything because it appears symmetrical.
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
# 12. LEADING ALIGNMENT
|
|
391
|
+
|
|
392
|
+
Leading alignment is often effective for information-heavy interfaces.
|
|
393
|
+
|
|
394
|
+
Example:
|
|
395
|
+
|
|
396
|
+
```text
|
|
397
|
+
Track Title
|
|
398
|
+
Artist
|
|
399
|
+
Album
|
|
400
|
+
Duration
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
It creates a clear reading edge.
|
|
404
|
+
|
|
405
|
+
Use especially for:
|
|
406
|
+
|
|
407
|
+
* lists
|
|
408
|
+
* settings
|
|
409
|
+
* forms
|
|
410
|
+
* text-heavy screens
|
|
411
|
+
* navigation structures
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
# 13. CENTER ALIGNMENT
|
|
416
|
+
|
|
417
|
+
Center alignment can work well for:
|
|
418
|
+
|
|
419
|
+
* empty states
|
|
420
|
+
* focused content
|
|
421
|
+
* media
|
|
422
|
+
* splash/launch experiences
|
|
423
|
+
* simple actions
|
|
424
|
+
* isolated information
|
|
425
|
+
|
|
426
|
+
Do not center large amounts of text simply to make a screen appear modern.
|
|
427
|
+
|
|
428
|
+
Long-form text generally benefits from predictable reading alignment.
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
# 14. TRAILING ALIGNMENT
|
|
433
|
+
|
|
434
|
+
Trailing alignment can communicate:
|
|
435
|
+
|
|
436
|
+
* values
|
|
437
|
+
* status
|
|
438
|
+
* metadata
|
|
439
|
+
* secondary actions
|
|
440
|
+
|
|
441
|
+
Example:
|
|
442
|
+
|
|
443
|
+
```text
|
|
444
|
+
Downloads 12
|
|
445
|
+
Storage 4.2 GB
|
|
446
|
+
Version 2.1
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
Use carefully.
|
|
450
|
+
|
|
451
|
+
Too many trailing elements create visual competition.
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
# 15. BASELINE ALIGNMENT
|
|
456
|
+
|
|
457
|
+
Text of different sizes can appear misaligned even when their bounding boxes
|
|
458
|
+
are technically aligned.
|
|
459
|
+
|
|
460
|
+
Use typographic baselines when presenting:
|
|
461
|
+
|
|
462
|
+
* numbers
|
|
463
|
+
* labels
|
|
464
|
+
* metadata
|
|
465
|
+
* mixed text sizes
|
|
466
|
+
|
|
467
|
+
Example:
|
|
468
|
+
|
|
469
|
+
```text
|
|
470
|
+
$ 49.99
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
should visually align rather than simply sharing top edges.
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
# 16. GRID THINKING
|
|
478
|
+
|
|
479
|
+
A grid provides invisible structure.
|
|
480
|
+
|
|
481
|
+
The grid can govern:
|
|
482
|
+
|
|
483
|
+
* margins
|
|
484
|
+
* columns
|
|
485
|
+
* content widths
|
|
486
|
+
* card placement
|
|
487
|
+
* alignment
|
|
488
|
+
* spacing
|
|
489
|
+
|
|
490
|
+
The user should not necessarily see the grid.
|
|
491
|
+
|
|
492
|
+
They should feel its consistency.
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
# 17. GRID DOES NOT MEAN EVERYTHING MUST BE BOXED
|
|
497
|
+
|
|
498
|
+
A common design mistake is translating every grid relationship into visible
|
|
499
|
+
cards.
|
|
500
|
+
|
|
501
|
+
The grid can remain invisible.
|
|
502
|
+
|
|
503
|
+
Prefer:
|
|
504
|
+
|
|
505
|
+
```text
|
|
506
|
+
alignment
|
|
507
|
+
+
|
|
508
|
+
spacing
|
|
509
|
+
+
|
|
510
|
+
typography
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
before adding:
|
|
514
|
+
|
|
515
|
+
```text
|
|
516
|
+
border
|
|
517
|
+
+
|
|
518
|
+
background
|
|
519
|
+
+
|
|
520
|
+
shadow
|
|
521
|
+
+
|
|
522
|
+
radius
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
---
|
|
526
|
+
|
|
527
|
+
# 18. CONTAINMENT
|
|
528
|
+
|
|
529
|
+
Containment communicates grouping.
|
|
530
|
+
|
|
531
|
+
A container may be created through:
|
|
532
|
+
|
|
533
|
+
* spacing
|
|
534
|
+
* background
|
|
535
|
+
* border
|
|
536
|
+
* divider
|
|
537
|
+
* material
|
|
538
|
+
* typography
|
|
539
|
+
* shape
|
|
540
|
+
|
|
541
|
+
Use the least visually expensive mechanism that communicates the relationship.
|
|
542
|
+
|
|
543
|
+
## Priority
|
|
544
|
+
|
|
545
|
+
Prefer:
|
|
546
|
+
|
|
547
|
+
```text
|
|
548
|
+
spacing
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
before:
|
|
552
|
+
|
|
553
|
+
```text
|
|
554
|
+
visible container
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
when spacing alone is sufficient.
|
|
558
|
+
|
|
559
|
+
---
|
|
560
|
+
|
|
561
|
+
# 19. THE CARD OVERUSE PROBLEM
|
|
562
|
+
|
|
563
|
+
Do not put every section inside a card.
|
|
564
|
+
|
|
565
|
+
Example of poor composition:
|
|
566
|
+
|
|
567
|
+
```text
|
|
568
|
+
┌───────────────┐
|
|
569
|
+
│ Profile │
|
|
570
|
+
└───────────────┘
|
|
571
|
+
|
|
572
|
+
┌───────────────┐
|
|
573
|
+
│ Statistics │
|
|
574
|
+
└───────────────┘
|
|
575
|
+
|
|
576
|
+
┌───────────────┐
|
|
577
|
+
│ Settings │
|
|
578
|
+
└───────────────┘
|
|
579
|
+
|
|
580
|
+
┌───────────────┐
|
|
581
|
+
│ Activity │
|
|
582
|
+
└───────────────┘
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
This can create:
|
|
586
|
+
|
|
587
|
+
* visual noise
|
|
588
|
+
* excessive hierarchy
|
|
589
|
+
* fragmented content
|
|
590
|
+
* unnecessary boundaries
|
|
591
|
+
|
|
592
|
+
Instead consider:
|
|
593
|
+
|
|
594
|
+
```text
|
|
595
|
+
Profile
|
|
596
|
+
|
|
597
|
+
Statistics
|
|
598
|
+
|
|
599
|
+
────────────
|
|
600
|
+
|
|
601
|
+
Settings
|
|
602
|
+
|
|
603
|
+
Activity
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
when spatial grouping is sufficient.
|
|
607
|
+
|
|
608
|
+
---
|
|
609
|
+
|
|
610
|
+
# 20. SPACING AS SEMANTICS
|
|
611
|
+
|
|
612
|
+
Spacing should communicate relationship strength.
|
|
613
|
+
|
|
614
|
+
Conceptually:
|
|
615
|
+
|
|
616
|
+
```text
|
|
617
|
+
XS
|
|
618
|
+
↓
|
|
619
|
+
very strong relationship
|
|
620
|
+
|
|
621
|
+
S
|
|
622
|
+
↓
|
|
623
|
+
related elements
|
|
624
|
+
|
|
625
|
+
M
|
|
626
|
+
↓
|
|
627
|
+
normal separation
|
|
628
|
+
|
|
629
|
+
L
|
|
630
|
+
↓
|
|
631
|
+
section separation
|
|
632
|
+
|
|
633
|
+
XL
|
|
634
|
+
↓
|
|
635
|
+
major conceptual transition
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
Do not define values first.
|
|
639
|
+
|
|
640
|
+
Define relationships first.
|
|
641
|
+
|
|
642
|
+
---
|
|
643
|
+
|
|
644
|
+
# 21. SPACING RHYTHM
|
|
645
|
+
|
|
646
|
+
A polished interface usually has a recognizable rhythm.
|
|
647
|
+
|
|
648
|
+
Example:
|
|
649
|
+
|
|
650
|
+
```text
|
|
651
|
+
8
|
|
652
|
+
8
|
|
653
|
+
16
|
|
654
|
+
24
|
|
655
|
+
8
|
|
656
|
+
8
|
|
657
|
+
16
|
|
658
|
+
32
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
This does not mean every application must use those exact values.
|
|
662
|
+
|
|
663
|
+
The point is that spacing should feel systematic rather than random.
|
|
664
|
+
|
|
665
|
+
---
|
|
666
|
+
|
|
667
|
+
# 22. SPACING TOKENS
|
|
668
|
+
|
|
669
|
+
Use semantic tokens.
|
|
670
|
+
|
|
671
|
+
Example:
|
|
672
|
+
|
|
673
|
+
```ts
|
|
674
|
+
spacing = {
|
|
675
|
+
none: 0,
|
|
676
|
+
xs: 4,
|
|
677
|
+
sm: 8,
|
|
678
|
+
md: 12,
|
|
679
|
+
lg: 16,
|
|
680
|
+
xl: 24,
|
|
681
|
+
xxl: 32,
|
|
682
|
+
xxxl: 48,
|
|
683
|
+
}
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
A real design system may use different values.
|
|
687
|
+
|
|
688
|
+
The agent should use the project's token system rather than inventing
|
|
689
|
+
screen-specific numbers.
|
|
690
|
+
|
|
691
|
+
---
|
|
692
|
+
|
|
693
|
+
# 23. CONTENT GROUPING
|
|
694
|
+
|
|
695
|
+
If two elements belong together:
|
|
696
|
+
|
|
697
|
+
```text
|
|
698
|
+
reduce spacing
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
If two elements represent different concepts:
|
|
702
|
+
|
|
703
|
+
```text
|
|
704
|
+
increase spacing
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
If the relationship is still unclear:
|
|
708
|
+
|
|
709
|
+
```text
|
|
710
|
+
consider containment or hierarchy
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
Example:
|
|
714
|
+
|
|
715
|
+
```text
|
|
716
|
+
Track title
|
|
717
|
+
Artist
|
|
718
|
+
Album
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
Playback controls
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
The larger gap communicates that playback controls are a different group.
|
|
725
|
+
|
|
726
|
+
---
|
|
727
|
+
|
|
728
|
+
# 24. NEGATIVE SPACE
|
|
729
|
+
|
|
730
|
+
Empty space is an active design element.
|
|
731
|
+
|
|
732
|
+
It can:
|
|
733
|
+
|
|
734
|
+
* establish hierarchy
|
|
735
|
+
* reduce cognitive load
|
|
736
|
+
* separate concepts
|
|
737
|
+
* highlight important content
|
|
738
|
+
* improve readability
|
|
739
|
+
* create visual calm
|
|
740
|
+
|
|
741
|
+
Do not fill empty areas merely because they are empty.
|
|
742
|
+
|
|
743
|
+
---
|
|
744
|
+
|
|
745
|
+
# 25. EMPTY SPACE MUST HAVE PURPOSE
|
|
746
|
+
|
|
747
|
+
There is a difference between:
|
|
748
|
+
|
|
749
|
+
```text
|
|
750
|
+
intentional whitespace
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
and:
|
|
754
|
+
|
|
755
|
+
```text
|
|
756
|
+
unused layout space
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
Ask:
|
|
760
|
+
|
|
761
|
+
> Does this space improve comprehension?
|
|
762
|
+
|
|
763
|
+
If yes:
|
|
764
|
+
|
|
765
|
+
Keep it.
|
|
766
|
+
|
|
767
|
+
If no:
|
|
768
|
+
|
|
769
|
+
Investigate whether content or hierarchy should change.
|
|
770
|
+
|
|
771
|
+
---
|
|
772
|
+
|
|
773
|
+
# 26. VISUAL BALANCE
|
|
774
|
+
|
|
775
|
+
Balance does not necessarily mean symmetry.
|
|
776
|
+
|
|
777
|
+
A screen can be asymmetric while remaining balanced.
|
|
778
|
+
|
|
779
|
+
Balance depends on:
|
|
780
|
+
|
|
781
|
+
* visual weight
|
|
782
|
+
* size
|
|
783
|
+
* color
|
|
784
|
+
* density
|
|
785
|
+
* position
|
|
786
|
+
* whitespace
|
|
787
|
+
* imagery
|
|
788
|
+
|
|
789
|
+
Example:
|
|
790
|
+
|
|
791
|
+
A large image may visually balance several smaller text elements.
|
|
792
|
+
|
|
793
|
+
---
|
|
794
|
+
|
|
795
|
+
# 27. VISUAL WEIGHT
|
|
796
|
+
|
|
797
|
+
Visual weight increases with:
|
|
798
|
+
|
|
799
|
+
* size
|
|
800
|
+
* contrast
|
|
801
|
+
* saturation
|
|
802
|
+
* density
|
|
803
|
+
* boldness
|
|
804
|
+
* visual complexity
|
|
805
|
+
* strong borders
|
|
806
|
+
* large imagery
|
|
807
|
+
|
|
808
|
+
The agent should consider visual weight when evaluating hierarchy.
|
|
809
|
+
|
|
810
|
+
A visually loud secondary element can accidentally become the apparent
|
|
811
|
+
primary action.
|
|
812
|
+
|
|
813
|
+
---
|
|
814
|
+
|
|
815
|
+
# 28. HIERARCHY THROUGH SCALE
|
|
816
|
+
|
|
817
|
+
Larger elements attract attention.
|
|
818
|
+
|
|
819
|
+
But:
|
|
820
|
+
|
|
821
|
+
```text
|
|
822
|
+
bigger != automatically better
|
|
823
|
+
```
|
|
824
|
+
|
|
825
|
+
Use scale deliberately.
|
|
826
|
+
|
|
827
|
+
Example:
|
|
828
|
+
|
|
829
|
+
```text
|
|
830
|
+
Screen title
|
|
831
|
+
↓
|
|
832
|
+
Section heading
|
|
833
|
+
↓
|
|
834
|
+
Body
|
|
835
|
+
↓
|
|
836
|
+
Metadata
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
Each level should have a meaningful role.
|
|
840
|
+
|
|
841
|
+
---
|
|
842
|
+
|
|
843
|
+
# 29. HIERARCHY THROUGH CONTRAST
|
|
844
|
+
|
|
845
|
+
Contrast can communicate priority.
|
|
846
|
+
|
|
847
|
+
Examples:
|
|
848
|
+
|
|
849
|
+
```text
|
|
850
|
+
primary text
|
|
851
|
+
secondary text
|
|
852
|
+
tertiary text
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
Avoid reducing secondary text so much that it becomes inaccessible.
|
|
856
|
+
|
|
857
|
+
Hierarchy must remain compatible with accessibility.
|
|
858
|
+
|
|
859
|
+
---
|
|
860
|
+
|
|
861
|
+
# 30. HIERARCHY THROUGH SPACING
|
|
862
|
+
|
|
863
|
+
Spacing can be more elegant than increasing font size.
|
|
864
|
+
|
|
865
|
+
To emphasize a section:
|
|
866
|
+
|
|
867
|
+
```text
|
|
868
|
+
increase separation above it
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
rather than:
|
|
872
|
+
|
|
873
|
+
```text
|
|
874
|
+
make the heading enormous
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
---
|
|
878
|
+
|
|
879
|
+
# 31. HIERARCHY THROUGH POSITION
|
|
880
|
+
|
|
881
|
+
People naturally scan predictable regions.
|
|
882
|
+
|
|
883
|
+
Important information often benefits from being placed where users expect
|
|
884
|
+
to encounter it.
|
|
885
|
+
|
|
886
|
+
However, do not rely on assumed screen positions alone.
|
|
887
|
+
|
|
888
|
+
Task and platform conventions matter.
|
|
889
|
+
|
|
890
|
+
---
|
|
891
|
+
|
|
892
|
+
# 32. FLOATING ELEMENTS
|
|
893
|
+
|
|
894
|
+
Floating elements can be useful for:
|
|
895
|
+
|
|
896
|
+
* primary actions
|
|
897
|
+
* media controls
|
|
898
|
+
* contextual tools
|
|
899
|
+
* transient controls
|
|
900
|
+
|
|
901
|
+
But they should not obscure important content.
|
|
902
|
+
|
|
903
|
+
## Agent questions
|
|
904
|
+
|
|
905
|
+
* What does this float above?
|
|
906
|
+
* Why must it float?
|
|
907
|
+
* Can the user dismiss it?
|
|
908
|
+
* Does it block interaction?
|
|
909
|
+
* Does it interfere with scrolling?
|
|
910
|
+
* Does it conflict with system UI?
|
|
911
|
+
|
|
912
|
+
---
|
|
913
|
+
|
|
914
|
+
# 33. STICKY ELEMENTS
|
|
915
|
+
|
|
916
|
+
Persistent headers or controls can improve navigation.
|
|
917
|
+
|
|
918
|
+
But persistent UI consumes valuable screen space.
|
|
919
|
+
|
|
920
|
+
Use sticky elements when their continued presence provides meaningful value.
|
|
921
|
+
|
|
922
|
+
Examples:
|
|
923
|
+
|
|
924
|
+
* navigation
|
|
925
|
+
* section context
|
|
926
|
+
* playback controls
|
|
927
|
+
* important filtering
|
|
928
|
+
|
|
929
|
+
Avoid permanently pinning low-value information.
|
|
930
|
+
|
|
931
|
+
---
|
|
932
|
+
|
|
933
|
+
# 34. SCROLLING
|
|
934
|
+
|
|
935
|
+
Scrolling is not a failure of layout.
|
|
936
|
+
|
|
937
|
+
Long content should scroll when appropriate.
|
|
938
|
+
|
|
939
|
+
The problem is unnecessary scrolling.
|
|
940
|
+
|
|
941
|
+
## Agent rule
|
|
942
|
+
|
|
943
|
+
Ask:
|
|
944
|
+
|
|
945
|
+
> Can the user reach important information without excessive navigation?
|
|
946
|
+
|
|
947
|
+
Do not compress content unnaturally simply to avoid scrolling.
|
|
948
|
+
|
|
949
|
+
---
|
|
950
|
+
|
|
951
|
+
# 35. SCROLL CONTEXT
|
|
952
|
+
|
|
953
|
+
Users should understand that content continues.
|
|
954
|
+
|
|
955
|
+
Useful cues include:
|
|
956
|
+
|
|
957
|
+
* partial next content
|
|
958
|
+
* content flow
|
|
959
|
+
* persistent headers
|
|
960
|
+
* scroll indicators where appropriate
|
|
961
|
+
* natural spacing
|
|
962
|
+
|
|
963
|
+
Do not accidentally create a screen that looks complete when more content
|
|
964
|
+
exists below.
|
|
965
|
+
|
|
966
|
+
---
|
|
967
|
+
|
|
968
|
+
# 36. SCROLL PERFORMANCE
|
|
969
|
+
|
|
970
|
+
Layout quality includes scrolling performance.
|
|
971
|
+
|
|
972
|
+
Avoid structures that create:
|
|
973
|
+
|
|
974
|
+
* excessive re-rendering
|
|
975
|
+
* huge component trees
|
|
976
|
+
* unnecessary nested scrolling
|
|
977
|
+
* expensive effects
|
|
978
|
+
* excessive blur
|
|
979
|
+
* heavy shadows
|
|
980
|
+
* oversized images
|
|
981
|
+
|
|
982
|
+
A beautiful layout that stutters is not a polished layout.
|
|
983
|
+
|
|
984
|
+
---
|
|
985
|
+
|
|
986
|
+
# 37. NESTED SCROLLING
|
|
987
|
+
|
|
988
|
+
Nested scrolling should be intentional.
|
|
989
|
+
|
|
990
|
+
Example:
|
|
991
|
+
|
|
992
|
+
```text
|
|
993
|
+
Vertical screen
|
|
994
|
+
↓
|
|
995
|
+
Horizontal carousel
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
is common and understandable.
|
|
999
|
+
|
|
1000
|
+
But:
|
|
1001
|
+
|
|
1002
|
+
```text
|
|
1003
|
+
Vertical
|
|
1004
|
+
↓
|
|
1005
|
+
Vertical
|
|
1006
|
+
↓
|
|
1007
|
+
Horizontal
|
|
1008
|
+
↓
|
|
1009
|
+
Vertical
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
can become difficult to control.
|
|
1013
|
+
|
|
1014
|
+
Avoid nested vertical scroll containers unless the interaction clearly
|
|
1015
|
+
requires them.
|
|
1016
|
+
|
|
1017
|
+
---
|
|
1018
|
+
|
|
1019
|
+
# 38. RESPONSIVE LAYOUT MODEL
|
|
1020
|
+
|
|
1021
|
+
A responsive interface should transform according to available space.
|
|
1022
|
+
|
|
1023
|
+
Conceptually:
|
|
1024
|
+
|
|
1025
|
+
```text
|
|
1026
|
+
AVAILABLE SPACE
|
|
1027
|
+
↓
|
|
1028
|
+
CONTENT REQUIREMENTS
|
|
1029
|
+
↓
|
|
1030
|
+
LAYOUT MODE
|
|
1031
|
+
```
|
|
1032
|
+
|
|
1033
|
+
Possible modes:
|
|
1034
|
+
|
|
1035
|
+
```text
|
|
1036
|
+
compact
|
|
1037
|
+
regular
|
|
1038
|
+
expanded
|
|
1039
|
+
```
|
|
1040
|
+
|
|
1041
|
+
Do not define layout solely from device names.
|
|
1042
|
+
|
|
1043
|
+
A layout should respond to actual available space.
|
|
1044
|
+
|
|
1045
|
+
---
|
|
1046
|
+
|
|
1047
|
+
# 39. COMPACT LAYOUT
|
|
1048
|
+
|
|
1049
|
+
Compact layouts prioritize:
|
|
1050
|
+
|
|
1051
|
+
* essential content
|
|
1052
|
+
* primary actions
|
|
1053
|
+
* simple navigation
|
|
1054
|
+
* vertical flow
|
|
1055
|
+
|
|
1056
|
+
Use progressive disclosure for secondary functionality.
|
|
1057
|
+
|
|
1058
|
+
Typical phone portrait scenarios fall into this category.
|
|
1059
|
+
|
|
1060
|
+
---
|
|
1061
|
+
|
|
1062
|
+
# 40. REGULAR LAYOUT
|
|
1063
|
+
|
|
1064
|
+
Regular layouts allow:
|
|
1065
|
+
|
|
1066
|
+
* more persistent navigation
|
|
1067
|
+
* richer grouping
|
|
1068
|
+
* larger content areas
|
|
1069
|
+
* multi-column arrangements
|
|
1070
|
+
|
|
1071
|
+
Do not simply add whitespace.
|
|
1072
|
+
|
|
1073
|
+
Use additional space to reveal useful relationships.
|
|
1074
|
+
|
|
1075
|
+
---
|
|
1076
|
+
|
|
1077
|
+
# 41. EXPANDED LAYOUT
|
|
1078
|
+
|
|
1079
|
+
Expanded layouts can support:
|
|
1080
|
+
|
|
1081
|
+
* sidebars
|
|
1082
|
+
* multi-column content
|
|
1083
|
+
* persistent controls
|
|
1084
|
+
* simultaneous information
|
|
1085
|
+
* larger previews
|
|
1086
|
+
|
|
1087
|
+
The agent should ask:
|
|
1088
|
+
|
|
1089
|
+
> What information becomes useful when this space becomes available?
|
|
1090
|
+
|
|
1091
|
+
---
|
|
1092
|
+
|
|
1093
|
+
# 42. ADAPTIVE VS SCALING
|
|
1094
|
+
|
|
1095
|
+
Bad responsive strategy:
|
|
1096
|
+
|
|
1097
|
+
```text
|
|
1098
|
+
phone UI
|
|
1099
|
+
↓
|
|
1100
|
+
multiply dimensions
|
|
1101
|
+
↓
|
|
1102
|
+
tablet UI
|
|
1103
|
+
```
|
|
1104
|
+
|
|
1105
|
+
Better:
|
|
1106
|
+
|
|
1107
|
+
```text
|
|
1108
|
+
same semantic structure
|
|
1109
|
+
↓
|
|
1110
|
+
different spatial composition
|
|
1111
|
+
```
|
|
1112
|
+
|
|
1113
|
+
Example:
|
|
1114
|
+
|
|
1115
|
+
```text
|
|
1116
|
+
Phone:
|
|
1117
|
+
|
|
1118
|
+
[Album]
|
|
1119
|
+
[Tracks]
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
iPad:
|
|
1123
|
+
|
|
1124
|
+
[Album] | [Tracks]
|
|
1125
|
+
```
|
|
1126
|
+
|
|
1127
|
+
The information relationship improves because the available space changed.
|
|
1128
|
+
|
|
1129
|
+
---
|
|
1130
|
+
|
|
1131
|
+
# 43. MULTI-COLUMN LAYOUTS
|
|
1132
|
+
|
|
1133
|
+
Use columns when content relationships benefit from simultaneous visibility.
|
|
1134
|
+
|
|
1135
|
+
Good examples:
|
|
1136
|
+
|
|
1137
|
+
```text
|
|
1138
|
+
Sidebar | Content
|
|
1139
|
+
```
|
|
1140
|
+
|
|
1141
|
+
```text
|
|
1142
|
+
Navigation | List | Detail
|
|
1143
|
+
```
|
|
1144
|
+
|
|
1145
|
+
```text
|
|
1146
|
+
Preview | Editor
|
|
1147
|
+
```
|
|
1148
|
+
|
|
1149
|
+
Avoid multi-column layouts when columns create:
|
|
1150
|
+
|
|
1151
|
+
* tiny content
|
|
1152
|
+
* difficult reading
|
|
1153
|
+
* excessive scanning
|
|
1154
|
+
* ambiguous hierarchy
|
|
1155
|
+
|
|
1156
|
+
---
|
|
1157
|
+
|
|
1158
|
+
# 44. SIDEBARS
|
|
1159
|
+
|
|
1160
|
+
A sidebar should represent navigation or persistent contextual structure.
|
|
1161
|
+
|
|
1162
|
+
Do not turn it into a dumping ground for every control.
|
|
1163
|
+
|
|
1164
|
+
A useful sidebar answers:
|
|
1165
|
+
|
|
1166
|
+
> Where can I go?
|
|
1167
|
+
|
|
1168
|
+
or:
|
|
1169
|
+
|
|
1170
|
+
> What context am I currently working within?
|
|
1171
|
+
|
|
1172
|
+
---
|
|
1173
|
+
|
|
1174
|
+
# 45. DETAIL PANELS
|
|
1175
|
+
|
|
1176
|
+
On larger layouts, detail panels can reduce navigation.
|
|
1177
|
+
|
|
1178
|
+
Example:
|
|
1179
|
+
|
|
1180
|
+
```text
|
|
1181
|
+
Library
|
|
1182
|
+
↓
|
|
1183
|
+
Select album
|
|
1184
|
+
↓
|
|
1185
|
+
Details appear beside library
|
|
1186
|
+
```
|
|
1187
|
+
|
|
1188
|
+
This can be more efficient than:
|
|
1189
|
+
|
|
1190
|
+
```text
|
|
1191
|
+
Library
|
|
1192
|
+
↓
|
|
1193
|
+
Open album
|
|
1194
|
+
↓
|
|
1195
|
+
New screen
|
|
1196
|
+
↓
|
|
1197
|
+
Back
|
|
1198
|
+
```
|
|
1199
|
+
|
|
1200
|
+
when the device provides sufficient space.
|
|
1201
|
+
|
|
1202
|
+
---
|
|
1203
|
+
|
|
1204
|
+
# 46. IMAGE LAYOUT
|
|
1205
|
+
|
|
1206
|
+
Images have strong visual weight.
|
|
1207
|
+
|
|
1208
|
+
Use them deliberately.
|
|
1209
|
+
|
|
1210
|
+
Consider:
|
|
1211
|
+
|
|
1212
|
+
* aspect ratio
|
|
1213
|
+
* cropping
|
|
1214
|
+
* focal point
|
|
1215
|
+
* content hierarchy
|
|
1216
|
+
* loading state
|
|
1217
|
+
* accessibility
|
|
1218
|
+
* performance
|
|
1219
|
+
|
|
1220
|
+
Do not distort images simply to fill a container.
|
|
1221
|
+
|
|
1222
|
+
---
|
|
1223
|
+
|
|
1224
|
+
# 47. ASPECT RATIO
|
|
1225
|
+
|
|
1226
|
+
Preserve meaningful aspect ratios.
|
|
1227
|
+
|
|
1228
|
+
Common patterns:
|
|
1229
|
+
|
|
1230
|
+
```text
|
|
1231
|
+
1:1
|
|
1232
|
+
4:3
|
|
1233
|
+
3:2
|
|
1234
|
+
16:9
|
|
1235
|
+
```
|
|
1236
|
+
|
|
1237
|
+
The appropriate ratio depends on content.
|
|
1238
|
+
|
|
1239
|
+
For example:
|
|
1240
|
+
|
|
1241
|
+
Album artwork:
|
|
1242
|
+
|
|
1243
|
+
```text
|
|
1244
|
+
1:1
|
|
1245
|
+
```
|
|
1246
|
+
|
|
1247
|
+
Video:
|
|
1248
|
+
|
|
1249
|
+
```text
|
|
1250
|
+
16:9
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
Portrait photography:
|
|
1254
|
+
|
|
1255
|
+
```text
|
|
1256
|
+
3:4
|
|
1257
|
+
```
|
|
1258
|
+
|
|
1259
|
+
Do not force every image into the same ratio.
|
|
1260
|
+
|
|
1261
|
+
---
|
|
1262
|
+
|
|
1263
|
+
# 48. CROP STRATEGY
|
|
1264
|
+
|
|
1265
|
+
When cropping is necessary:
|
|
1266
|
+
|
|
1267
|
+
* preserve the subject
|
|
1268
|
+
* avoid cutting important content
|
|
1269
|
+
* consider focal points
|
|
1270
|
+
* maintain consistent presentation
|
|
1271
|
+
|
|
1272
|
+
The agent should distinguish:
|
|
1273
|
+
|
|
1274
|
+
```text
|
|
1275
|
+
contain
|
|
1276
|
+
cover
|
|
1277
|
+
stretch
|
|
1278
|
+
```
|
|
1279
|
+
|
|
1280
|
+
and choose intentionally.
|
|
1281
|
+
|
|
1282
|
+
---
|
|
1283
|
+
|
|
1284
|
+
# 49. TEXT + IMAGE COMPOSITION
|
|
1285
|
+
|
|
1286
|
+
When text accompanies imagery, determine the dominant element.
|
|
1287
|
+
|
|
1288
|
+
Possible hierarchy:
|
|
1289
|
+
|
|
1290
|
+
```text
|
|
1291
|
+
Image
|
|
1292
|
+
Title
|
|
1293
|
+
Metadata
|
|
1294
|
+
```
|
|
1295
|
+
|
|
1296
|
+
or:
|
|
1297
|
+
|
|
1298
|
+
```text
|
|
1299
|
+
Title
|
|
1300
|
+
Description
|
|
1301
|
+
Image
|
|
1302
|
+
```
|
|
1303
|
+
|
|
1304
|
+
Do not let the image automatically dominate simply because it is visually
|
|
1305
|
+
strong.
|
|
1306
|
+
|
|
1307
|
+
---
|
|
1308
|
+
|
|
1309
|
+
# 50. FULL-BLEED CONTENT
|
|
1310
|
+
|
|
1311
|
+
Full-bleed content is useful for:
|
|
1312
|
+
|
|
1313
|
+
* photos
|
|
1314
|
+
* videos
|
|
1315
|
+
* maps
|
|
1316
|
+
* immersive media
|
|
1317
|
+
* backgrounds
|
|
1318
|
+
|
|
1319
|
+
But text and controls placed over full-bleed content require additional
|
|
1320
|
+
contrast and hierarchy consideration.
|
|
1321
|
+
|
|
1322
|
+
---
|
|
1323
|
+
|
|
1324
|
+
# 51. OVERLAYS
|
|
1325
|
+
|
|
1326
|
+
Overlays should remain readable over the underlying content.
|
|
1327
|
+
|
|
1328
|
+
Consider:
|
|
1329
|
+
|
|
1330
|
+
* contrast
|
|
1331
|
+
* blur
|
|
1332
|
+
* scrims
|
|
1333
|
+
* material
|
|
1334
|
+
* shadows
|
|
1335
|
+
* typography
|
|
1336
|
+
|
|
1337
|
+
Avoid:
|
|
1338
|
+
|
|
1339
|
+
```text
|
|
1340
|
+
white text
|
|
1341
|
+
+
|
|
1342
|
+
bright image
|
|
1343
|
+
+
|
|
1344
|
+
no contrast treatment
|
|
1345
|
+
```
|
|
1346
|
+
|
|
1347
|
+
---
|
|
1348
|
+
|
|
1349
|
+
# 52. MATERIAL LAYERS
|
|
1350
|
+
|
|
1351
|
+
Material layers can separate content from backgrounds.
|
|
1352
|
+
|
|
1353
|
+
Conceptually:
|
|
1354
|
+
|
|
1355
|
+
```text
|
|
1356
|
+
Background
|
|
1357
|
+
↓
|
|
1358
|
+
Material layer
|
|
1359
|
+
↓
|
|
1360
|
+
Content
|
|
1361
|
+
```
|
|
1362
|
+
|
|
1363
|
+
Use materials to communicate depth.
|
|
1364
|
+
|
|
1365
|
+
Do not use translucency as a replacement for hierarchy.
|
|
1366
|
+
|
|
1367
|
+
---
|
|
1368
|
+
|
|
1369
|
+
# 53. CORNERS AND CONTAINERS
|
|
1370
|
+
|
|
1371
|
+
Rounded corners can communicate grouping and modernity, but they are not
|
|
1372
|
+
a substitute for layout.
|
|
1373
|
+
|
|
1374
|
+
Do not independently assign random radii to every component.
|
|
1375
|
+
|
|
1376
|
+
Use semantic shape tokens.
|
|
1377
|
+
|
|
1378
|
+
Example:
|
|
1379
|
+
|
|
1380
|
+
```text
|
|
1381
|
+
shape.compact
|
|
1382
|
+
shape.control
|
|
1383
|
+
shape.card
|
|
1384
|
+
shape.sheet
|
|
1385
|
+
shape.modal
|
|
1386
|
+
```
|
|
1387
|
+
|
|
1388
|
+
---
|
|
1389
|
+
|
|
1390
|
+
# 54. CORNER CONSISTENCY
|
|
1391
|
+
|
|
1392
|
+
Related components should generally share compatible corner language.
|
|
1393
|
+
|
|
1394
|
+
Bad:
|
|
1395
|
+
|
|
1396
|
+
```text
|
|
1397
|
+
Button = 8
|
|
1398
|
+
Card = 31
|
|
1399
|
+
Input = 14
|
|
1400
|
+
Sheet = 26
|
|
1401
|
+
Chip = 19
|
|
1402
|
+
```
|
|
1403
|
+
|
|
1404
|
+
with no underlying system.
|
|
1405
|
+
|
|
1406
|
+
Better:
|
|
1407
|
+
|
|
1408
|
+
```text
|
|
1409
|
+
small radius
|
|
1410
|
+
medium radius
|
|
1411
|
+
large radius
|
|
1412
|
+
```
|
|
1413
|
+
|
|
1414
|
+
with intentional relationships.
|
|
1415
|
+
|
|
1416
|
+
---
|
|
1417
|
+
|
|
1418
|
+
# 55. DIVIDERS
|
|
1419
|
+
|
|
1420
|
+
Dividers can clarify list or section boundaries.
|
|
1421
|
+
|
|
1422
|
+
But do not use dividers everywhere.
|
|
1423
|
+
|
|
1424
|
+
Hierarchy can often be communicated through spacing.
|
|
1425
|
+
|
|
1426
|
+
Prefer:
|
|
1427
|
+
|
|
1428
|
+
```text
|
|
1429
|
+
spacing
|
|
1430
|
+
```
|
|
1431
|
+
|
|
1432
|
+
when sufficient.
|
|
1433
|
+
|
|
1434
|
+
Use dividers when a stronger separation is actually needed.
|
|
1435
|
+
|
|
1436
|
+
---
|
|
1437
|
+
|
|
1438
|
+
# 56. GROUPED CONTENT
|
|
1439
|
+
|
|
1440
|
+
Grouping can be achieved through:
|
|
1441
|
+
|
|
1442
|
+
```text
|
|
1443
|
+
spacing
|
|
1444
|
+
background
|
|
1445
|
+
material
|
|
1446
|
+
divider
|
|
1447
|
+
typography
|
|
1448
|
+
alignment
|
|
1449
|
+
```
|
|
1450
|
+
|
|
1451
|
+
Use multiple mechanisms only when necessary.
|
|
1452
|
+
|
|
1453
|
+
Too many grouping signals create visual noise.
|
|
1454
|
+
|
|
1455
|
+
---
|
|
1456
|
+
|
|
1457
|
+
# 57. FORMS
|
|
1458
|
+
|
|
1459
|
+
Forms should prioritize:
|
|
1460
|
+
|
|
1461
|
+
* clear labels
|
|
1462
|
+
* logical order
|
|
1463
|
+
* comfortable inputs
|
|
1464
|
+
* validation
|
|
1465
|
+
* keyboard behavior
|
|
1466
|
+
* error recovery
|
|
1467
|
+
|
|
1468
|
+
Avoid excessively decorative form containers.
|
|
1469
|
+
|
|
1470
|
+
The user's goal is completing the form, not admiring it.
|
|
1471
|
+
|
|
1472
|
+
---
|
|
1473
|
+
|
|
1474
|
+
# 58. FORM SPACING
|
|
1475
|
+
|
|
1476
|
+
Related:
|
|
1477
|
+
|
|
1478
|
+
```text
|
|
1479
|
+
Label
|
|
1480
|
+
Input
|
|
1481
|
+
Validation message
|
|
1482
|
+
```
|
|
1483
|
+
|
|
1484
|
+
should remain close.
|
|
1485
|
+
|
|
1486
|
+
Separate fields with larger spacing.
|
|
1487
|
+
|
|
1488
|
+
Example:
|
|
1489
|
+
|
|
1490
|
+
```text
|
|
1491
|
+
Email
|
|
1492
|
+
[____________]
|
|
1493
|
+
Error
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
Password
|
|
1497
|
+
[____________]
|
|
1498
|
+
```
|
|
1499
|
+
|
|
1500
|
+
The error belongs to the field.
|
|
1501
|
+
|
|
1502
|
+
Do not place validation messages far away.
|
|
1503
|
+
|
|
1504
|
+
---
|
|
1505
|
+
|
|
1506
|
+
# 59. BUTTON LAYOUT
|
|
1507
|
+
|
|
1508
|
+
Buttons should communicate hierarchy.
|
|
1509
|
+
|
|
1510
|
+
Possible levels:
|
|
1511
|
+
|
|
1512
|
+
```text
|
|
1513
|
+
Primary
|
|
1514
|
+
Secondary
|
|
1515
|
+
Tertiary
|
|
1516
|
+
Destructive
|
|
1517
|
+
```
|
|
1518
|
+
|
|
1519
|
+
Do not make every button visually dominant.
|
|
1520
|
+
|
|
1521
|
+
Example:
|
|
1522
|
+
|
|
1523
|
+
```text
|
|
1524
|
+
[Save Changes] ← primary
|
|
1525
|
+
|
|
1526
|
+
Cancel ← secondary
|
|
1527
|
+
```
|
|
1528
|
+
|
|
1529
|
+
rather than:
|
|
1530
|
+
|
|
1531
|
+
```text
|
|
1532
|
+
[SAVE]
|
|
1533
|
+
[CANCEL]
|
|
1534
|
+
[DELETE]
|
|
1535
|
+
[MORE]
|
|
1536
|
+
[RESET]
|
|
1537
|
+
```
|
|
1538
|
+
|
|
1539
|
+
all with identical visual weight.
|
|
1540
|
+
|
|
1541
|
+
---
|
|
1542
|
+
|
|
1543
|
+
# 60. ACTION GROUPING
|
|
1544
|
+
|
|
1545
|
+
Actions that belong together should be spatially grouped.
|
|
1546
|
+
|
|
1547
|
+
Example:
|
|
1548
|
+
|
|
1549
|
+
```text
|
|
1550
|
+
[Cancel] [Save]
|
|
1551
|
+
```
|
|
1552
|
+
|
|
1553
|
+
is understandable.
|
|
1554
|
+
|
|
1555
|
+
But:
|
|
1556
|
+
|
|
1557
|
+
```text
|
|
1558
|
+
[Save]
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
[Cancel]
|
|
1562
|
+
```
|
|
1563
|
+
|
|
1564
|
+
may imply a different relationship.
|
|
1565
|
+
|
|
1566
|
+
Placement communicates priority and sequence.
|
|
1567
|
+
|
|
1568
|
+
---
|
|
1569
|
+
|
|
1570
|
+
# 61. PRIMARY ACTION PLACEMENT
|
|
1571
|
+
|
|
1572
|
+
Primary actions should be located where users can comfortably reach and
|
|
1573
|
+
predict them.
|
|
1574
|
+
|
|
1575
|
+
Do not force one universal placement across all applications.
|
|
1576
|
+
|
|
1577
|
+
Consider:
|
|
1578
|
+
|
|
1579
|
+
* platform conventions
|
|
1580
|
+
* screen type
|
|
1581
|
+
* frequency
|
|
1582
|
+
* destructive risk
|
|
1583
|
+
* keyboard
|
|
1584
|
+
* scrolling
|
|
1585
|
+
* navigation
|
|
1586
|
+
|
|
1587
|
+
---
|
|
1588
|
+
|
|
1589
|
+
# 62. BOTTOM ACTION AREAS
|
|
1590
|
+
|
|
1591
|
+
Bottom action areas can be useful for frequent actions.
|
|
1592
|
+
|
|
1593
|
+
Consider:
|
|
1594
|
+
|
|
1595
|
+
* home indicator
|
|
1596
|
+
* safe area
|
|
1597
|
+
* keyboard
|
|
1598
|
+
* scrolling
|
|
1599
|
+
* persistent screen space
|
|
1600
|
+
|
|
1601
|
+
A bottom action area should not cover content.
|
|
1602
|
+
|
|
1603
|
+
---
|
|
1604
|
+
|
|
1605
|
+
# 63. FLOATING ACTIONS
|
|
1606
|
+
|
|
1607
|
+
Floating actions should have a clear purpose.
|
|
1608
|
+
|
|
1609
|
+
Good:
|
|
1610
|
+
|
|
1611
|
+
```text
|
|
1612
|
+
Create
|
|
1613
|
+
Compose
|
|
1614
|
+
Add
|
|
1615
|
+
Start
|
|
1616
|
+
```
|
|
1617
|
+
|
|
1618
|
+
Poor:
|
|
1619
|
+
|
|
1620
|
+
```text
|
|
1621
|
+
Every secondary command
|
|
1622
|
+
```
|
|
1623
|
+
|
|
1624
|
+
A floating action should not become an excuse to bypass hierarchy.
|
|
1625
|
+
|
|
1626
|
+
---
|
|
1627
|
+
|
|
1628
|
+
# 64. COMPONENT DENSITY
|
|
1629
|
+
|
|
1630
|
+
Density should match context.
|
|
1631
|
+
|
|
1632
|
+
Examples:
|
|
1633
|
+
|
|
1634
|
+
Developer tool:
|
|
1635
|
+
|
|
1636
|
+
```text
|
|
1637
|
+
high information density
|
|
1638
|
+
```
|
|
1639
|
+
|
|
1640
|
+
Reading application:
|
|
1641
|
+
|
|
1642
|
+
```text
|
|
1643
|
+
low information density
|
|
1644
|
+
```
|
|
1645
|
+
|
|
1646
|
+
Media library:
|
|
1647
|
+
|
|
1648
|
+
```text
|
|
1649
|
+
moderate/high visual density
|
|
1650
|
+
```
|
|
1651
|
+
|
|
1652
|
+
Onboarding:
|
|
1653
|
+
|
|
1654
|
+
```text
|
|
1655
|
+
low density
|
|
1656
|
+
```
|
|
1657
|
+
|
|
1658
|
+
The agent should optimize for task efficiency.
|
|
1659
|
+
|
|
1660
|
+
---
|
|
1661
|
+
|
|
1662
|
+
# 65. VISUAL BREATHING ROOM
|
|
1663
|
+
|
|
1664
|
+
Premium interfaces often feel spacious because related elements are grouped
|
|
1665
|
+
tightly while unrelated groups have enough separation.
|
|
1666
|
+
|
|
1667
|
+
This produces:
|
|
1668
|
+
|
|
1669
|
+
```text
|
|
1670
|
+
dense relationships
|
|
1671
|
+
+
|
|
1672
|
+
open structure
|
|
1673
|
+
```
|
|
1674
|
+
|
|
1675
|
+
rather than:
|
|
1676
|
+
|
|
1677
|
+
```text
|
|
1678
|
+
everything far apart
|
|
1679
|
+
```
|
|
1680
|
+
|
|
1681
|
+
---
|
|
1682
|
+
|
|
1683
|
+
# 66. LAYOUT FAILURE MODES
|
|
1684
|
+
|
|
1685
|
+
The agent should actively detect:
|
|
1686
|
+
|
|
1687
|
+
## Random spacing
|
|
1688
|
+
|
|
1689
|
+
No recognizable spacing system.
|
|
1690
|
+
|
|
1691
|
+
## Random alignment
|
|
1692
|
+
|
|
1693
|
+
Elements do not share meaningful edges.
|
|
1694
|
+
|
|
1695
|
+
## Card soup
|
|
1696
|
+
|
|
1697
|
+
Everything is contained.
|
|
1698
|
+
|
|
1699
|
+
## Edge crowding
|
|
1700
|
+
|
|
1701
|
+
Important elements approach system boundaries.
|
|
1702
|
+
|
|
1703
|
+
## Oversized headers
|
|
1704
|
+
|
|
1705
|
+
Typography consumes space without adding hierarchy.
|
|
1706
|
+
|
|
1707
|
+
## Floating clutter
|
|
1708
|
+
|
|
1709
|
+
Too many floating elements.
|
|
1710
|
+
|
|
1711
|
+
## Navigation dominance
|
|
1712
|
+
|
|
1713
|
+
Navigation occupies more visual attention than content.
|
|
1714
|
+
|
|
1715
|
+
## Empty-space waste
|
|
1716
|
+
|
|
1717
|
+
Large areas provide no meaningful hierarchy.
|
|
1718
|
+
|
|
1719
|
+
## Information compression
|
|
1720
|
+
|
|
1721
|
+
Too much content is forced into too little space.
|
|
1722
|
+
|
|
1723
|
+
## Fixed dimensions
|
|
1724
|
+
|
|
1725
|
+
Layouts break under text or device changes.
|
|
1726
|
+
|
|
1727
|
+
---
|
|
1728
|
+
|
|
1729
|
+
# 67. LAYOUT AUDIT
|
|
1730
|
+
|
|
1731
|
+
When reviewing a screenshot, evaluate:
|
|
1732
|
+
|
|
1733
|
+
```text
|
|
1734
|
+
1. Screen boundaries
|
|
1735
|
+
2. Safe areas
|
|
1736
|
+
3. Primary content
|
|
1737
|
+
4. Navigation
|
|
1738
|
+
5. Horizontal alignment
|
|
1739
|
+
6. Vertical rhythm
|
|
1740
|
+
7. Section grouping
|
|
1741
|
+
8. Content density
|
|
1742
|
+
9. Visual hierarchy
|
|
1743
|
+
10. Touch targets
|
|
1744
|
+
11. Responsive behavior
|
|
1745
|
+
12. Text wrapping
|
|
1746
|
+
13. Image ratios
|
|
1747
|
+
14. Floating elements
|
|
1748
|
+
15. Bottom regions
|
|
1749
|
+
16. Keyboard behavior
|
|
1750
|
+
17. Accessibility scaling
|
|
1751
|
+
```
|
|
1752
|
+
|
|
1753
|
+
---
|
|
1754
|
+
|
|
1755
|
+
# 68. SCREENSHOT ANALYSIS METHOD
|
|
1756
|
+
|
|
1757
|
+
When an agent receives a screenshot, do not immediately suggest colors.
|
|
1758
|
+
|
|
1759
|
+
First map:
|
|
1760
|
+
|
|
1761
|
+
```text
|
|
1762
|
+
SCREEN
|
|
1763
|
+
↓
|
|
1764
|
+
REGIONS
|
|
1765
|
+
↓
|
|
1766
|
+
CONTAINERS
|
|
1767
|
+
↓
|
|
1768
|
+
ALIGNMENT LINES
|
|
1769
|
+
↓
|
|
1770
|
+
SPACING
|
|
1771
|
+
↓
|
|
1772
|
+
HIERARCHY
|
|
1773
|
+
↓
|
|
1774
|
+
INTERACTION
|
|
1775
|
+
```
|
|
1776
|
+
|
|
1777
|
+
Example:
|
|
1778
|
+
|
|
1779
|
+
```text
|
|
1780
|
+
┌─────────────────────────┐
|
|
1781
|
+
│ Navigation │
|
|
1782
|
+
├─────────────────────────┤
|
|
1783
|
+
│ │
|
|
1784
|
+
│ Primary visual │
|
|
1785
|
+
│ │
|
|
1786
|
+
├─────────────────────────┤
|
|
1787
|
+
│ Metadata │
|
|
1788
|
+
├─────────────────────────┤
|
|
1789
|
+
│ Primary controls │
|
|
1790
|
+
├─────────────────────────┤
|
|
1791
|
+
│ Secondary content │
|
|
1792
|
+
└─────────────────────────┘
|
|
1793
|
+
```
|
|
1794
|
+
|
|
1795
|
+
Only after structural analysis should visual styling be evaluated.
|
|
1796
|
+
|
|
1797
|
+
---
|
|
1798
|
+
|
|
1799
|
+
# 69. IMPLEMENTATION RULE
|
|
1800
|
+
|
|
1801
|
+
Prefer layout systems over coordinate placement.
|
|
1802
|
+
|
|
1803
|
+
Prefer:
|
|
1804
|
+
|
|
1805
|
+
```tsx
|
|
1806
|
+
<View style={styles.container}>
|
|
1807
|
+
<View style={styles.header} />
|
|
1808
|
+
<View style={styles.content} />
|
|
1809
|
+
</View>
|
|
1810
|
+
```
|
|
1811
|
+
|
|
1812
|
+
with flex/grid-like relationships.
|
|
1813
|
+
|
|
1814
|
+
Avoid:
|
|
1815
|
+
|
|
1816
|
+
```tsx
|
|
1817
|
+
<View
|
|
1818
|
+
style={{
|
|
1819
|
+
position: "absolute",
|
|
1820
|
+
top: 127,
|
|
1821
|
+
left: 43,
|
|
1822
|
+
}}
|
|
1823
|
+
/>
|
|
1824
|
+
```
|
|
1825
|
+
|
|
1826
|
+
unless absolute positioning is genuinely required.
|
|
1827
|
+
|
|
1828
|
+
Absolute positioning is appropriate for:
|
|
1829
|
+
|
|
1830
|
+
* overlays
|
|
1831
|
+
* badges
|
|
1832
|
+
* floating controls
|
|
1833
|
+
* decorative layers
|
|
1834
|
+
* media overlays
|
|
1835
|
+
|
|
1836
|
+
It should not become the primary layout system.
|
|
1837
|
+
|
|
1838
|
+
---
|
|
1839
|
+
|
|
1840
|
+
# 70. DESIGN TOKENS
|
|
1841
|
+
|
|
1842
|
+
Layout values should come from semantic tokens.
|
|
1843
|
+
|
|
1844
|
+
Example:
|
|
1845
|
+
|
|
1846
|
+
```ts
|
|
1847
|
+
const layout = {
|
|
1848
|
+
screenPadding: spacing.lg,
|
|
1849
|
+
sectionGap: spacing.xl,
|
|
1850
|
+
contentGap: spacing.md,
|
|
1851
|
+
controlGap: spacing.sm,
|
|
1852
|
+
minimumTouchTarget: 44,
|
|
1853
|
+
};
|
|
1854
|
+
```
|
|
1855
|
+
|
|
1856
|
+
The exact values belong to the product.
|
|
1857
|
+
|
|
1858
|
+
The agent should never scatter magic numbers throughout the UI.
|
|
1859
|
+
|
|
1860
|
+
---
|
|
1861
|
+
|
|
1862
|
+
# 71. RESPONSIVE TOKENS
|
|
1863
|
+
|
|
1864
|
+
Consider semantic layout modes.
|
|
1865
|
+
|
|
1866
|
+
Example:
|
|
1867
|
+
|
|
1868
|
+
```ts
|
|
1869
|
+
const layoutMode = {
|
|
1870
|
+
compact: {
|
|
1871
|
+
horizontalPadding: 16,
|
|
1872
|
+
contentGap: 12,
|
|
1873
|
+
},
|
|
1874
|
+
|
|
1875
|
+
regular: {
|
|
1876
|
+
horizontalPadding: 24,
|
|
1877
|
+
contentGap: 16,
|
|
1878
|
+
},
|
|
1879
|
+
|
|
1880
|
+
expanded: {
|
|
1881
|
+
horizontalPadding: 32,
|
|
1882
|
+
contentGap: 24,
|
|
1883
|
+
},
|
|
1884
|
+
};
|
|
1885
|
+
```
|
|
1886
|
+
|
|
1887
|
+
These are examples only.
|
|
1888
|
+
|
|
1889
|
+
Do not blindly copy the values.
|
|
1890
|
+
|
|
1891
|
+
---
|
|
1892
|
+
|
|
1893
|
+
# 72. DESIGN SYSTEM RELATIONSHIP
|
|
1894
|
+
|
|
1895
|
+
Layout tokens should interact with:
|
|
1896
|
+
|
|
1897
|
+
```text
|
|
1898
|
+
typography
|
|
1899
|
+
color
|
|
1900
|
+
shape
|
|
1901
|
+
motion
|
|
1902
|
+
components
|
|
1903
|
+
accessibility
|
|
1904
|
+
```
|
|
1905
|
+
|
|
1906
|
+
Example:
|
|
1907
|
+
|
|
1908
|
+
A larger Dynamic Type setting may require:
|
|
1909
|
+
|
|
1910
|
+
```text
|
|
1911
|
+
larger vertical spacing
|
|
1912
|
+
+
|
|
1913
|
+
different toolbar composition
|
|
1914
|
+
+
|
|
1915
|
+
increased container height
|
|
1916
|
+
```
|
|
1917
|
+
|
|
1918
|
+
Therefore layout cannot be designed independently.
|
|
1919
|
+
|
|
1920
|
+
---
|
|
1921
|
+
|
|
1922
|
+
# 73. ACCESSIBILITY AND LAYOUT
|
|
1923
|
+
|
|
1924
|
+
Accessibility can change layout requirements.
|
|
1925
|
+
|
|
1926
|
+
Examples:
|
|
1927
|
+
|
|
1928
|
+
Larger text:
|
|
1929
|
+
|
|
1930
|
+
```text
|
|
1931
|
+
horizontal layout
|
|
1932
|
+
↓
|
|
1933
|
+
may need
|
|
1934
|
+
↓
|
|
1935
|
+
vertical layout
|
|
1936
|
+
```
|
|
1937
|
+
|
|
1938
|
+
VoiceOver:
|
|
1939
|
+
|
|
1940
|
+
```text
|
|
1941
|
+
visual grouping
|
|
1942
|
+
↓
|
|
1943
|
+
semantic grouping
|
|
1944
|
+
```
|
|
1945
|
+
|
|
1946
|
+
Reduced motion:
|
|
1947
|
+
|
|
1948
|
+
```text
|
|
1949
|
+
animated transition
|
|
1950
|
+
↓
|
|
1951
|
+
simplified transition
|
|
1952
|
+
```
|
|
1953
|
+
|
|
1954
|
+
The agent must design for accessibility from the beginning.
|
|
1955
|
+
|
|
1956
|
+
---
|
|
1957
|
+
|
|
1958
|
+
# 74. LOCALIZATION AND LAYOUT
|
|
1959
|
+
|
|
1960
|
+
Different languages can produce dramatically different text lengths.
|
|
1961
|
+
|
|
1962
|
+
Therefore:
|
|
1963
|
+
|
|
1964
|
+
Do not assume:
|
|
1965
|
+
|
|
1966
|
+
```text
|
|
1967
|
+
Title = 100px
|
|
1968
|
+
```
|
|
1969
|
+
|
|
1970
|
+
Instead:
|
|
1971
|
+
|
|
1972
|
+
```text
|
|
1973
|
+
Title = content-driven
|
|
1974
|
+
```
|
|
1975
|
+
|
|
1976
|
+
Test:
|
|
1977
|
+
|
|
1978
|
+
* short labels
|
|
1979
|
+
* long labels
|
|
1980
|
+
* translated labels
|
|
1981
|
+
* multiline labels
|
|
1982
|
+
|
|
1983
|
+
Avoid clipping whenever possible.
|
|
1984
|
+
|
|
1985
|
+
---
|
|
1986
|
+
|
|
1987
|
+
# 75. LARGE CONTENT
|
|
1988
|
+
|
|
1989
|
+
Large user-generated content can break layouts.
|
|
1990
|
+
|
|
1991
|
+
Examples:
|
|
1992
|
+
|
|
1993
|
+
```text
|
|
1994
|
+
"Very Long Playlist Name That Continues For A Very Long Time"
|
|
1995
|
+
```
|
|
1996
|
+
|
|
1997
|
+
or:
|
|
1998
|
+
|
|
1999
|
+
```text
|
|
2000
|
+
"Some Extremely Long Artist Name..."
|
|
2001
|
+
```
|
|
2002
|
+
|
|
2003
|
+
Design deliberate behavior:
|
|
2004
|
+
|
|
2005
|
+
* wrapping
|
|
2006
|
+
* truncation
|
|
2007
|
+
* scrolling
|
|
2008
|
+
* expansion
|
|
2009
|
+
* tooltip/contextual detail
|
|
2010
|
+
|
|
2011
|
+
Do not let content silently overlap adjacent controls.
|
|
2012
|
+
|
|
2013
|
+
---
|
|
2014
|
+
|
|
2015
|
+
# 76. ANIMATION AND LAYOUT
|
|
2016
|
+
|
|
2017
|
+
Layout changes can be animated when doing so communicates continuity.
|
|
2018
|
+
|
|
2019
|
+
Examples:
|
|
2020
|
+
|
|
2021
|
+
* expanding sections
|
|
2022
|
+
* sheet presentation
|
|
2023
|
+
* list insertion
|
|
2024
|
+
* item movement
|
|
2025
|
+
* navigation
|
|
2026
|
+
|
|
2027
|
+
Motion should communicate:
|
|
2028
|
+
|
|
2029
|
+
```text
|
|
2030
|
+
where something came from
|
|
2031
|
+
where it went
|
|
2032
|
+
what changed
|
|
2033
|
+
```
|
|
2034
|
+
|
|
2035
|
+
Do not animate every layout change.
|
|
2036
|
+
|
|
2037
|
+
---
|
|
2038
|
+
|
|
2039
|
+
# 77. LAYOUT STATE MODEL
|
|
2040
|
+
|
|
2041
|
+
A screen should be considered across states.
|
|
2042
|
+
|
|
2043
|
+
Example:
|
|
2044
|
+
|
|
2045
|
+
```text
|
|
2046
|
+
default
|
|
2047
|
+
loading
|
|
2048
|
+
empty
|
|
2049
|
+
error
|
|
2050
|
+
success
|
|
2051
|
+
selected
|
|
2052
|
+
editing
|
|
2053
|
+
keyboard-visible
|
|
2054
|
+
expanded
|
|
2055
|
+
collapsed
|
|
2056
|
+
offline
|
|
2057
|
+
accessibility-large-text
|
|
2058
|
+
```
|
|
2059
|
+
|
|
2060
|
+
A layout that only works in the default state is incomplete.
|
|
2061
|
+
|
|
2062
|
+
---
|
|
2063
|
+
|
|
2064
|
+
# 78. REAL DEVICE VALIDATION
|
|
2065
|
+
|
|
2066
|
+
Never rely exclusively on:
|
|
2067
|
+
|
|
2068
|
+
* design files
|
|
2069
|
+
* browser previews
|
|
2070
|
+
* static screenshots
|
|
2071
|
+
* simulator defaults
|
|
2072
|
+
|
|
2073
|
+
Validate on actual devices when possible.
|
|
2074
|
+
|
|
2075
|
+
Inspect:
|
|
2076
|
+
|
|
2077
|
+
* safe areas
|
|
2078
|
+
* touch
|
|
2079
|
+
* text
|
|
2080
|
+
* scrolling
|
|
2081
|
+
* keyboard
|
|
2082
|
+
* orientation
|
|
2083
|
+
* performance
|
|
2084
|
+
* gestures
|
|
2085
|
+
|
|
2086
|
+
---
|
|
2087
|
+
|
|
2088
|
+
# 79. AGENT LAYOUT WORKFLOW
|
|
2089
|
+
|
|
2090
|
+
When creating a new screen:
|
|
2091
|
+
|
|
2092
|
+
```text
|
|
2093
|
+
1. Define purpose
|
|
2094
|
+
↓
|
|
2095
|
+
2. Identify content
|
|
2096
|
+
↓
|
|
2097
|
+
3. Classify hierarchy
|
|
2098
|
+
↓
|
|
2099
|
+
4. Group related content
|
|
2100
|
+
↓
|
|
2101
|
+
5. Establish alignment
|
|
2102
|
+
↓
|
|
2103
|
+
6. Define spacing rhythm
|
|
2104
|
+
↓
|
|
2105
|
+
7. Establish content boundaries
|
|
2106
|
+
↓
|
|
2107
|
+
8. Respect safe areas
|
|
2108
|
+
↓
|
|
2109
|
+
9. Define responsive modes
|
|
2110
|
+
↓
|
|
2111
|
+
10. Define accessibility behavior
|
|
2112
|
+
↓
|
|
2113
|
+
11. Define state variations
|
|
2114
|
+
↓
|
|
2115
|
+
12. Add components
|
|
2116
|
+
↓
|
|
2117
|
+
13. Add visual styling
|
|
2118
|
+
↓
|
|
2119
|
+
14. Test real content
|
|
2120
|
+
↓
|
|
2121
|
+
15. Audit
|
|
2122
|
+
```
|
|
2123
|
+
|
|
2124
|
+
---
|
|
2125
|
+
|
|
2126
|
+
# 80. LAYOUT REVIEW QUESTIONS
|
|
2127
|
+
|
|
2128
|
+
Before approving a layout:
|
|
2129
|
+
|
|
2130
|
+
### Structure
|
|
2131
|
+
|
|
2132
|
+
* What is the primary content?
|
|
2133
|
+
* What is the primary action?
|
|
2134
|
+
* Are related elements grouped?
|
|
2135
|
+
|
|
2136
|
+
### Alignment
|
|
2137
|
+
|
|
2138
|
+
* Do important elements share meaningful edges?
|
|
2139
|
+
* Are there accidental misalignments?
|
|
2140
|
+
|
|
2141
|
+
### Spacing
|
|
2142
|
+
|
|
2143
|
+
* Is there a consistent rhythm?
|
|
2144
|
+
* Does spacing communicate relationships?
|
|
2145
|
+
|
|
2146
|
+
### Density
|
|
2147
|
+
|
|
2148
|
+
* Is the interface too crowded?
|
|
2149
|
+
* Is there unnecessary whitespace?
|
|
2150
|
+
|
|
2151
|
+
### Adaptation
|
|
2152
|
+
|
|
2153
|
+
* What happens on smaller screens?
|
|
2154
|
+
* What happens on larger screens?
|
|
2155
|
+
* What happens in landscape?
|
|
2156
|
+
|
|
2157
|
+
### Accessibility
|
|
2158
|
+
|
|
2159
|
+
* What happens with larger text?
|
|
2160
|
+
* Can the layout survive VoiceOver interaction?
|
|
2161
|
+
|
|
2162
|
+
### System UI
|
|
2163
|
+
|
|
2164
|
+
* Are safe areas respected?
|
|
2165
|
+
* Can the keyboard obscure content?
|
|
2166
|
+
|
|
2167
|
+
### Polish
|
|
2168
|
+
|
|
2169
|
+
* Are there random values?
|
|
2170
|
+
* Are containers consistent?
|
|
2171
|
+
* Are floating elements justified?
|
|
2172
|
+
|
|
2173
|
+
---
|
|
2174
|
+
|
|
2175
|
+
# 81. PREMIUM LAYOUT TEST
|
|
2176
|
+
|
|
2177
|
+
A high-quality layout should pass this test:
|
|
2178
|
+
|
|
2179
|
+
```text
|
|
2180
|
+
Remove the colors.
|
|
2181
|
+
↓
|
|
2182
|
+
Does the hierarchy still work?
|
|
2183
|
+
|
|
2184
|
+
Remove the shadows.
|
|
2185
|
+
↓
|
|
2186
|
+
Does grouping still work?
|
|
2187
|
+
|
|
2188
|
+
Remove the cards.
|
|
2189
|
+
↓
|
|
2190
|
+
Does spacing still communicate structure?
|
|
2191
|
+
|
|
2192
|
+
Increase text size.
|
|
2193
|
+
↓
|
|
2194
|
+
Does the interface remain usable?
|
|
2195
|
+
|
|
2196
|
+
Replace real data with long data.
|
|
2197
|
+
↓
|
|
2198
|
+
Does the layout survive?
|
|
2199
|
+
|
|
2200
|
+
Rotate the device.
|
|
2201
|
+
↓
|
|
2202
|
+
Does the composition adapt?
|
|
2203
|
+
|
|
2204
|
+
Hide decorative elements.
|
|
2205
|
+
↓
|
|
2206
|
+
Does the product still feel intentional?
|
|
2207
|
+
```
|
|
2208
|
+
|
|
2209
|
+
If the answer is yes, the layout has strong structural foundations.
|
|
2210
|
+
|
|
2211
|
+
---
|
|
2212
|
+
|
|
2213
|
+
# 82. IOS LAYOUT PRINCIPLE
|
|
2214
|
+
|
|
2215
|
+
Do not design a screen as a collection of coordinates.
|
|
2216
|
+
|
|
2217
|
+
Design it as a system of relationships.
|
|
2218
|
+
|
|
2219
|
+
Think:
|
|
2220
|
+
|
|
2221
|
+
```text
|
|
2222
|
+
THIS BELONGS TO THAT
|
|
2223
|
+
THIS IS MORE IMPORTANT THAN THAT
|
|
2224
|
+
THIS SHOULD BE EASIER TO REACH
|
|
2225
|
+
THIS SHOULD REMAIN VISIBLE
|
|
2226
|
+
THIS CAN MOVE
|
|
2227
|
+
THIS CAN COLLAPSE
|
|
2228
|
+
THIS CAN ADAPT
|
|
2229
|
+
THIS MUST NEVER BE OBSCURED
|
|
2230
|
+
```
|
|
2231
|
+
|
|
2232
|
+
That is layout intelligence.
|
|
2233
|
+
|
|
2234
|
+
---
|
|
2235
|
+
|
|
2236
|
+
# 83. QUICK REFERENCE
|
|
2237
|
+
|
|
2238
|
+
```text
|
|
2239
|
+
PURPOSE
|
|
2240
|
+
↓
|
|
2241
|
+
HIERARCHY
|
|
2242
|
+
↓
|
|
2243
|
+
GROUPING
|
|
2244
|
+
↓
|
|
2245
|
+
ALIGNMENT
|
|
2246
|
+
↓
|
|
2247
|
+
SPACING
|
|
2248
|
+
↓
|
|
2249
|
+
CONTAINMENT
|
|
2250
|
+
↓
|
|
2251
|
+
SAFE AREAS
|
|
2252
|
+
↓
|
|
2253
|
+
RESPONSIVENESS
|
|
2254
|
+
↓
|
|
2255
|
+
ACCESSIBILITY
|
|
2256
|
+
↓
|
|
2257
|
+
STATES
|
|
2258
|
+
↓
|
|
2259
|
+
POLISH
|
|
2260
|
+
```
|
|
2261
|
+
|
|
2262
|
+
---
|
|
2263
|
+
|
|
2264
|
+
# 84. FINAL RULE
|
|
2265
|
+
|
|
2266
|
+
A beautiful layout is not one where every element is perfectly centered.
|
|
2267
|
+
|
|
2268
|
+
A beautiful layout is one where the spatial relationships make the
|
|
2269
|
+
interface understandable without explanation.
|
|
2270
|
+
|
|
2271
|
+
The agent should therefore optimize for:
|
|
2272
|
+
|
|
2273
|
+
```text
|
|
2274
|
+
CLARITY
|
|
2275
|
+
+
|
|
2276
|
+
RELATIONSHIP
|
|
2277
|
+
+
|
|
2278
|
+
HIERARCHY
|
|
2279
|
+
+
|
|
2280
|
+
COMFORT
|
|
2281
|
+
+
|
|
2282
|
+
ADAPTABILITY
|
|
2283
|
+
+
|
|
2284
|
+
ACCESSIBILITY
|
|
2285
|
+
+
|
|
2286
|
+
PRECISION
|
|
2287
|
+
```
|
|
2288
|
+
|
|
2289
|
+
not merely:
|
|
2290
|
+
|
|
2291
|
+
```text
|
|
2292
|
+
SYMMETRY
|
|
2293
|
+
+
|
|
2294
|
+
DECORATION
|
|
2295
|
+
```
|
|
2296
|
+
|
|
2297
|
+
---
|
|
2298
|
+
|
|
2299
|
+
# 85. SOURCE
|
|
2300
|
+
|
|
2301
|
+
Apple Human Interface Guidelines:
|
|
2302
|
+
|
|
2303
|
+
[https://developer.apple.com/design/human-interface-guidelines/](https://developer.apple.com/design/human-interface-guidelines/)
|
|
2304
|
+
|
|
2305
|
+
Apple — Designing for iOS:
|
|
2306
|
+
|
|
2307
|
+
[https://developer.apple.com/design/human-interface-guidelines/designing-for-ios](https://developer.apple.com/design/human-interface-guidelines/designing-for-ios)
|
|
2308
|
+
|
|
2309
|
+
Apple — Layout:
|
|
2310
|
+
|
|
2311
|
+
[https://developer.apple.com/design/human-interface-guidelines/layout](https://developer.apple.com/design/human-interface-guidelines/layout)
|
|
2312
|
+
|
|
2313
|
+
Apple — Accessibility:
|
|
2314
|
+
|
|
2315
|
+
[https://developer.apple.com/design/human-interface-guidelines/accessibility](https://developer.apple.com/design/human-interface-guidelines/accessibility)
|
|
2316
|
+
|
|
2317
|
+
Apple — Typography:
|
|
2318
|
+
|
|
2319
|
+
[https://developer.apple.com/design/human-interface-guidelines/typography](https://developer.apple.com/design/human-interface-guidelines/typography)
|
|
2320
|
+
|
|
2321
|
+
````
|
|
2322
|
+
|
|
2323
|
+
### What this file adds
|
|
2324
|
+
|
|
2325
|
+
We're now establishing a key rule for the whole system:
|
|
2326
|
+
|
|
2327
|
+
> **The agent must understand relationships before styling.**
|
|
2328
|
+
|
|
2329
|
+
That becomes important later when we build the **screenshot/vision auditor**. It should be able to look at a screenshot and say *"these two elements are incorrectly grouped, this alignment is inconsistent, this spacing doesn't communicate hierarchy"* rather than just *"make the UI more premium."*
|
|
2330
|
+
|
|
2331
|
+
|