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.
Files changed (123) hide show
  1. package/AGENTS.md +47 -0
  2. package/CHANGELOG.md +25 -0
  3. package/README.md +78 -0
  4. package/bin/cli.mjs +375 -0
  5. package/knowledge/android/00-apple-to-android-adaption.md +1499 -0
  6. package/knowledge/android/accessibility.md +333 -0
  7. package/knowledge/android/components-controls.md +270 -0
  8. package/knowledge/android/material-design-3.md +174 -0
  9. package/knowledge/android/navigation-patterns.md +212 -0
  10. package/knowledge/apple/00-skill-reading-protocol.md +1296 -0
  11. package/knowledge/apple/Accessibility, Inclusive Design & Human Factors Intelligence.md +735 -0
  12. package/knowledge/apple/Advanced Interaction Patterns, Gestures, Feedback & State Transitions.md +1140 -0
  13. package/knowledge/apple/Advanced Navigation, Information Architecture & Wayfinding.md +551 -0
  14. package/knowledge/apple/Autonomus Ui-UX Improvement Loop.md +611 -0
  15. package/knowledge/apple/Color, Materials, Contrast, Themes & Visual Depth.md +1351 -0
  16. package/knowledge/apple/Content, Copy, Microinteractions & UX Communication.md +642 -0
  17. package/knowledge/apple/Data-Heavy Interfaces, Tables, Lists, Search, Filtering & Large-Scale Content.md +721 -0
  18. package/knowledge/apple/Design Systems & Component Architecture.md +412 -0
  19. package/knowledge/apple/Forms, Input, Data Entry & Validation Intelligence.md +705 -0
  20. package/knowledge/apple/Interaction, State & Edge-Case Engineering.md +491 -0
  21. package/knowledge/apple/Interaction-behaviour.md +1378 -0
  22. package/knowledge/apple/Layout Architecture, Responsive Design & Spatial Systems.md +1365 -0
  23. package/knowledge/apple/MASTER UI-UX ORCHESTRATOR.md +1210 -0
  24. package/knowledge/apple/Navigation Architecture, Routing, Deep Linking & State Restoration.md +1392 -0
  25. package/knowledge/apple/Navigation, Information Architecture & Spatial Hierarchy.md +1613 -0
  26. package/knowledge/apple/Notifications, Permissions, Privacy and Trust.md +1540 -0
  27. package/knowledge/apple/Patterns-templates-composition.md +647 -0
  28. package/knowledge/apple/Performance, Perceived Speed, Motion & Rendering Intelligence.md +855 -0
  29. package/knowledge/apple/Responsive, Adaptive & Cross-Platform UI Intelligence.md +669 -0
  30. package/knowledge/apple/Responsive, Adaptive, Accessible & Performant UI.md +545 -0
  31. package/knowledge/apple/Tablet Adaptation & Multi-Device UX.md +1447 -0
  32. package/knowledge/apple/UI Implementation & Refactoring.md +498 -0
  33. package/knowledge/apple/UI-UX Decision-Making, Prioritization & Trade-offs.md +533 -0
  34. package/knowledge/apple/UI-UX Project Lifecycle & Delivery.md +544 -0
  35. package/knowledge/apple/User Flows & Experience Architecture.md +335 -0
  36. package/knowledge/apple/Visual Design Systems, Theming, Tokens & Brand Intelligence.md +764 -0
  37. package/knowledge/apple/Visual QA, Testing & Validation.md +557 -0
  38. package/knowledge/apple/accessibility-inclusive-interaction.md +1361 -0
  39. package/knowledge/apple/accessibility.md +2162 -0
  40. package/knowledge/apple/color.md +1933 -0
  41. package/knowledge/apple/component-architecture.md +2208 -0
  42. package/knowledge/apple/components.md +2172 -0
  43. package/knowledge/apple/design-decision-framework.md +1883 -0
  44. package/knowledge/apple/design-review-engine.md +2108 -0
  45. package/knowledge/apple/design-tokens.md +1943 -0
  46. package/knowledge/apple/designing-for-ios.md +1680 -0
  47. package/knowledge/apple/gestures, touch behavior, feedback, motion, and micro-interactions.md +1538 -0
  48. package/knowledge/apple/hig-foundation.md +1806 -0
  49. package/knowledge/apple/iconography.md +1903 -0
  50. package/knowledge/apple/interaction-patterns.md +2513 -0
  51. package/knowledge/apple/interaction.md +2141 -0
  52. package/knowledge/apple/ios-alerts-confirmations-destructive-actions.md +1342 -0
  53. package/knowledge/apple/ios-components-and-controls.md +1634 -0
  54. package/knowledge/apple/ios-components-patterns.md +1343 -0
  55. package/knowledge/apple/ios-design-system-architecture.md +1520 -0
  56. package/knowledge/apple/ios-empty-error-offline-states.md +1370 -0
  57. package/knowledge/apple/ios-empty-loading-error-recovery.md +1674 -0
  58. package/knowledge/apple/ios-forms-and-input.md +1458 -0
  59. package/knowledge/apple/ios-forms-input-data-entry.md +1308 -0
  60. package/knowledge/apple/ios-gestures-and-touch.md +1272 -0
  61. package/knowledge/apple/ios-lists-collections-and-data-display.md +1735 -0
  62. package/knowledge/apple/ios-loading-progress-async-states.md +1378 -0
  63. package/knowledge/apple/ios-materials-and-surfaces.md +1543 -0
  64. package/knowledge/apple/ios-motion-animation-transitions.md +1178 -0
  65. package/knowledge/apple/ios-navigation-and-information-architecture.md +1674 -0
  66. package/knowledge/apple/ios-navigation-user-flows-design-architecture.md +1195 -0
  67. package/knowledge/apple/ios-search-and-discovery.md +1456 -0
  68. package/knowledge/apple/ios-search-filtering-discovery.md +1402 -0
  69. package/knowledge/apple/ios-sheets-modals-popovers.md +1205 -0
  70. package/knowledge/apple/ios-typography-icons-visual-hierarchy.md +1431 -0
  71. package/knowledge/apple/layout.md +2331 -0
  72. package/knowledge/apple/media-centric-content-ui-patterns.md +1470 -0
  73. package/knowledge/apple/motion, transitions, physics, and animation language.md +1535 -0
  74. package/knowledge/apple/motion-and-animation.md +1698 -0
  75. package/knowledge/apple/motion.md +2087 -0
  76. package/knowledge/apple/navigation.md +2281 -0
  77. package/knowledge/apple/responsive-adaptive.md +2159 -0
  78. package/knowledge/apple/screen-architecture.md +2067 -0
  79. package/knowledge/apple/typography, Content Hierarchy & Readability.md +1411 -0
  80. package/knowledge/apple/typography.md +1802 -0
  81. package/knowledge/apple/ui-ux inteligence audit.md +106 -0
  82. package/knowledge/apple/visual-design-and-premium-ui.md +1555 -0
  83. package/knowledge/apple/visual-hierarchy-engine.md +1647 -0
  84. package/knowledge/apple/visual-materials.md +2189 -0
  85. package/package.json +53 -0
  86. package/principles/design-principles.md +37 -0
  87. package/principles/platform-principles.md +25 -0
  88. package/principles/ux-principles.md +16 -0
  89. package/references/official-links.md +11 -0
  90. package/skills/accessibility-engineer/SKILL.md +125 -0
  91. package/skills/analytics-engineer/SKILL.md +283 -0
  92. package/skills/animation-engineer/SKILL.md +316 -0
  93. package/skills/component-designer/SKILL.md +75 -0
  94. package/skills/component-library-engineer/SKILL.md +140 -0
  95. package/skills/component-library-ops/SKILL.md +155 -0
  96. package/skills/design-system/SKILL.md +77 -0
  97. package/skills/design-token-engineer/SKILL.md +203 -0
  98. package/skills/design-token-pipeline/SKILL.md +277 -0
  99. package/skills/device-lab-engineer/SKILL.md +387 -0
  100. package/skills/forms-engineer/SKILL.md +79 -0
  101. package/skills/internationalization-engineer/SKILL.md +256 -0
  102. package/skills/motion-designer/SKILL.md +77 -0
  103. package/skills/native-data-fetching/SKILL.md +50 -0
  104. package/skills/navigation-architect/SKILL.md +65 -0
  105. package/skills/performance-engineer/SKILL.md +250 -0
  106. package/skills/platform-specialist/SKILL.md +95 -0
  107. package/skills/pre-release-gate/SKILL.md +75 -0
  108. package/skills/screen-designer/SKILL.md +117 -0
  109. package/skills/security-engineer/SKILL.md +375 -0
  110. package/skills/skills.json +134 -0
  111. package/skills/testing-auditor/SKILL.md +62 -0
  112. package/skills/ui-architect/SKILL.md +86 -0
  113. package/skills/ui-implementer/SKILL.md +188 -0
  114. package/skills/ux-architect/SKILL.md +49 -0
  115. package/skills/ux-auditor/SKILL.md +52 -0
  116. package/skills/visual-auditor/SKILL.md +71 -0
  117. package/templates/audit-report.md +29 -0
  118. package/templates/design-tokens.ts +33 -0
  119. package/templates/screen-spec.md +61 -0
  120. package/workflows/new-screen.md +17 -0
  121. package/workflows/pre-release.md +21 -0
  122. package/workflows/redesign.md +14 -0
  123. package/workflows/ui-audit.md +22 -0
@@ -0,0 +1,1272 @@
1
+
2
+ ```
3
+
4
+ # iOS Gestures & Touch Interaction
5
+
6
+ > Agent intelligence module for designing intuitive, discoverable, accessible,
7
+ > forgiving, and platform-aligned touch interactions.
8
+
9
+ Version: 1.0
10
+ Platform: iOS / iPadOS / React Native / Expo
11
+ Role: Gesture and touch intelligence
12
+
13
+ Parent:
14
+
15
+ * ios-design-system-architecture.md
16
+ * ios-components-and-controls.md
17
+ * ios-navigation-and-information-architecture.md
18
+ * ios-lists-collections-and-data-display.md
19
+ * ios-forms-and-input.md
20
+ * motion-and-animation.md
21
+ * accessibility-and-inclusive-design.md
22
+
23
+ # 1. PURPOSE
24
+
25
+ Touch interaction should feel:
26
+
27
+ ```text
28
+ Natural
29
+ Predictable
30
+ Responsive
31
+ Forgiving
32
+ Discoverable
33
+ ```
34
+
35
+ The user should rarely need to think about the mechanics of interaction.
36
+
37
+ # 2. TOUCH PRINCIPLE
38
+
39
+ Design around:
40
+
41
+ ```text
42
+ Intent
43
+ ↓
44
+ Gesture
45
+ ↓
46
+ Immediate feedback
47
+ ↓
48
+ Result
49
+ ```
50
+
51
+ not:
52
+
53
+ ```text
54
+ Gesture
55
+ ↓
56
+ Animation
57
+ ↓
58
+ Hidden behavior
59
+ ```
60
+
61
+ # 3. TOUCH TARGETS
62
+
63
+ Interactive controls should have sufficiently large touch targets.
64
+
65
+ A visually small icon can still have a generous invisible interaction area.
66
+
67
+ # 4. VISUAL SIZE VS TOUCH SIZE
68
+
69
+ Do not equate:
70
+
71
+ ```text
72
+ visual size = interaction size
73
+ ```
74
+
75
+ A compact control can provide a larger interactive region.
76
+
77
+ # 5. TOUCH TARGET COLLISIONS
78
+
79
+ Avoid overlapping interaction regions for nearby controls.
80
+
81
+ Users should never have to precisely target tiny adjacent actions.
82
+
83
+ # 6. GESTURE PURPOSE
84
+
85
+ Every custom gesture should have a clear purpose.
86
+
87
+ Ask:
88
+
89
+ ```text
90
+ What does this gesture accomplish?
91
+ Why is a gesture better than a visible control?
92
+ ```
93
+
94
+ If there is no strong answer, prefer a conventional control.
95
+
96
+ # 7. TAP
97
+
98
+ Tap is the fundamental interaction.
99
+
100
+ Use it for:
101
+
102
+ ```text
103
+ Open
104
+ Select
105
+ Activate
106
+ Play
107
+ Pause
108
+ Confirm
109
+ ```
110
+
111
+ .
112
+
113
+ # 8. DOUBLE TAP
114
+
115
+ Double tap should be used sparingly.
116
+
117
+ Users may not discover it without contextual cues.
118
+
119
+ # 9. LONG PRESS
120
+
121
+ Long press is appropriate for secondary actions such as:
122
+
123
+ ```text
124
+ Context menu
125
+ Preview
126
+ Selection mode
127
+ Reordering
128
+ Additional actions
129
+ ```
130
+
131
+ Do not hide essential functionality behind long press.
132
+
133
+ # 10. SWIPE
134
+
135
+ Swipe works well for:
136
+
137
+ ```text
138
+ Navigation
139
+ Dismissal
140
+ List actions
141
+ Page movement
142
+ ```
143
+
144
+ when the direction and result are intuitive.
145
+
146
+ # 11. EDGE SWIPE
147
+
148
+ Edge gestures should respect system navigation behavior.
149
+
150
+ Do not create interactions that compete with system-level gestures.
151
+
152
+ # 12. DRAG
153
+
154
+ Drag is appropriate for:
155
+
156
+ ```text
157
+ Reordering
158
+ Moving objects
159
+ Adjusting values
160
+ Dragging between destinations
161
+ ```
162
+
163
+ .
164
+
165
+ # 13. DRAG FEEDBACK
166
+
167
+ During a drag:
168
+
169
+ ```text
170
+ Source
171
+ ↓
172
+ Lift
173
+ ↓
174
+ Move
175
+ ↓
176
+ Target feedback
177
+ ↓
178
+ Drop
179
+ ```
180
+
181
+ should remain visually understandable.
182
+
183
+ # 14. DROP TARGETS
184
+
185
+ Valid destinations should communicate availability.
186
+
187
+ Invalid destinations should communicate rejection without unnecessary animation.
188
+
189
+ # 15. PINCH
190
+
191
+ Pinch is appropriate primarily for:
192
+
193
+ ```text
194
+ Zoom
195
+ Scale
196
+ Map manipulation
197
+ Image inspection
198
+ ```
199
+
200
+ Do not use pinch for arbitrary hidden application commands.
201
+
202
+ # 16. ROTATION
203
+
204
+ Rotation is useful where spatial manipulation is central to the task.
205
+
206
+ Avoid using it as a hidden command.
207
+
208
+ # 17. TWO-FINGER GESTURES
209
+
210
+ Two-finger interactions should be used only when they materially improve the
211
+ experience and do not block users who cannot perform them.
212
+
213
+ # 18. GESTURE DISCOVERABILITY
214
+
215
+ Important actions should not depend exclusively on undiscoverable gestures.
216
+
217
+ Provide visible alternatives when the action is important.
218
+
219
+ # 19. GESTURE REDUNDANCY
220
+
221
+ Critical functionality should generally have another interaction path.
222
+
223
+ Example:
224
+
225
+ ```text
226
+ Swipe to delete
227
+ +
228
+ Context menu / visible delete action
229
+ ```
230
+
231
+ where appropriate.
232
+
233
+ # 20. GESTURE CONSISTENCY
234
+
235
+ If swipe left means one thing in one part of the application, avoid making it
236
+ mean something radically different elsewhere without strong contextual reason.
237
+
238
+ # 21. DIRECTIONAL CONSISTENCY
239
+
240
+ Gestures should preserve intuitive spatial relationships.
241
+
242
+ Examples:
243
+
244
+ ```text
245
+ Swipe left → move toward next content
246
+ Swipe right → move back
247
+ Pull down → refresh / dismiss where appropriate
248
+ ```
249
+
250
+ Context determines the final behavior.
251
+
252
+ # 22. SWIPE ACTIONS
253
+
254
+ Swipe actions are especially useful in lists.
255
+
256
+ Typical actions:
257
+
258
+ ```text
259
+ Archive
260
+ Delete
261
+ Favorite
262
+ Mark read
263
+ More
264
+ ```
265
+
266
+ .
267
+
268
+ # 23. DESTRUCTIVE SWIPES
269
+
270
+ Destructive swipe actions require clear visual distinction.
271
+
272
+ Avoid accidental deletion.
273
+
274
+ # 24. SWIPE REVEAL
275
+
276
+ When actions are revealed:
277
+
278
+ ```text
279
+ gesture
280
+ ↓
281
+ actions appear
282
+ ↓
283
+ user selects action
284
+ ```
285
+
286
+ The system should not immediately execute the action unless the interaction
287
+ explicitly communicates that behavior.
288
+
289
+ # 25. FULL-SWIPE ACTION
290
+
291
+ Full-swipe execution may be appropriate for frequent, reversible actions.
292
+
293
+ Use caution for destructive actions.
294
+
295
+ # 26. UNDO
296
+
297
+ When an action can be safely reversed, undo can make gestures significantly
298
+ more forgiving.
299
+
300
+ # 27. GESTURE CANCELLATION
301
+
302
+ Users should be able to abandon a gesture naturally before committing it.
303
+
304
+ Example:
305
+
306
+ ```text
307
+ Drag
308
+ ↓
309
+ Move away from target
310
+ ↓
311
+ Cancel
312
+ ```
313
+
314
+ .
315
+
316
+ # 28. GESTURE THRESHOLDS
317
+
318
+ Avoid requiring excessive precision.
319
+
320
+ Use sensible thresholds for:
321
+
322
+ ```text
323
+ distance
324
+ velocity
325
+ direction
326
+ duration
327
+ ```
328
+
329
+ .
330
+
331
+ # 29. GESTURE VELOCITY
332
+
333
+ Velocity can distinguish:
334
+
335
+ ```text
336
+ Intentional swipe
337
+ Slow drag
338
+ Accidental movement
339
+ ```
340
+
341
+ but should not make interactions unpredictable.
342
+
343
+ # 30. GESTURE DIRECTION
344
+
345
+ Use directional thresholds to prevent tiny diagonal movements from triggering
346
+ unexpected actions.
347
+
348
+ # 31. GESTURE DEAD ZONES
349
+
350
+ Avoid excessive dead zones.
351
+
352
+ The user should not have to discover an invisible "correct starting position."
353
+
354
+ # 32. EDGE INTERACTIONS
355
+
356
+ Avoid placing important controls directly against system gesture regions unless
357
+ the platform interaction model supports it.
358
+
359
+ # 33. SCROLLING
360
+
361
+ Scrolling should feel directly connected to finger movement.
362
+
363
+ Avoid unnecessary lag or exaggerated acceleration.
364
+
365
+ # 34. SCROLL MOMENTUM
366
+
367
+ Natural momentum can communicate physical continuity.
368
+
369
+ Do not artificially amplify it to create spectacle.
370
+
371
+ # 35. SCROLL BOUNCE
372
+
373
+ Use platform-native behavior where possible.
374
+
375
+ Do not recreate platform physics unnecessarily.
376
+
377
+ # 36. PULL TO REFRESH
378
+
379
+ Use pull-to-refresh when:
380
+
381
+ ```text
382
+ content can become stale
383
+ refreshing is a meaningful user action
384
+ ```
385
+
386
+ Do not add it merely because it is familiar.
387
+
388
+ # 37. REFRESH FEEDBACK
389
+
390
+ The user should understand:
391
+
392
+ ```text
393
+ Pull
394
+ ↓
395
+ Threshold
396
+ ↓
397
+ Release
398
+ ↓
399
+ Refreshing
400
+ ↓
401
+ Updated
402
+ ```
403
+
404
+ .
405
+
406
+ # 38. REFRESH FAILURE
407
+
408
+ If refresh fails:
409
+
410
+ ```text
411
+ Preserve existing content
412
+ +
413
+ Communicate failure
414
+ +
415
+ Provide recovery
416
+ ```
417
+
418
+ Do not replace useful content with an empty error screen.
419
+
420
+ # 39. SCROLL POSITION
421
+
422
+ Preserve scroll position when returning to a screen where appropriate.
423
+
424
+ # 40. SCROLL RESTORATION
425
+
426
+ When navigating back:
427
+
428
+ ```text
429
+ Previous content
430
+ Previous position
431
+ Previous context
432
+ ```
433
+
434
+ should generally remain available.
435
+
436
+ # 41. INTERACTIVE SCROLL
437
+
438
+ Interactive elements inside scroll containers must not create ambiguous gesture
439
+ ownership.
440
+
441
+ # 42. GESTURE CONFLICT
442
+
443
+ Common conflicts:
444
+
445
+ ```text
446
+ Horizontal swipe
447
+ vs
448
+ Vertical scroll
449
+
450
+ Nested scroll
451
+ vs
452
+ Parent scroll
453
+
454
+ Drag
455
+ vs
456
+ Scroll
457
+
458
+ Edge swipe
459
+ vs
460
+ Application gesture
461
+ ```
462
+
463
+ Resolve conflicts explicitly.
464
+
465
+ # 43. GESTURE PRIORITY
466
+
467
+ Define which gesture wins when multiple gestures begin simultaneously.
468
+
469
+ The priority should reflect user intent.
470
+
471
+ # 44. DIRECTION LOCKING
472
+
473
+ For horizontal actions inside vertical lists, directional locking can prevent
474
+ accidental activation.
475
+
476
+ # 45. NESTED GESTURES
477
+
478
+ Nested gesture systems should remain predictable.
479
+
480
+ Avoid creating gesture hierarchies users cannot understand.
481
+
482
+ # 46. GESTURE INTERRUPTION
483
+
484
+ If another system action interrupts a gesture:
485
+
486
+ ```text
487
+ cancel gracefully
488
+ restore valid state
489
+ ```
490
+
491
+ Never leave the UI visually between states.
492
+
493
+ # 47. TOUCH FEEDBACK
494
+
495
+ Touch should produce immediate feedback when appropriate.
496
+
497
+ Feedback may include:
498
+
499
+ ```text
500
+ Highlight
501
+ Scale
502
+ Opacity
503
+ Haptic
504
+ State change
505
+ ```
506
+
507
+ .
508
+
509
+ # 48. PRESS STATE
510
+
511
+ Buttons should visibly acknowledge a press.
512
+
513
+ The feedback should happen quickly enough to establish responsiveness.
514
+
515
+ # 49. PRESS ANIMATION
516
+
517
+ Keep press animations short.
518
+
519
+ The interaction should never feel delayed because of animation.
520
+
521
+ # 50. HAPTIC FEEDBACK
522
+
523
+ Use haptics to reinforce meaningful interactions.
524
+
525
+ Good candidates:
526
+
527
+ ```text
528
+ Selection
529
+ Toggle
530
+ Important confirmation
531
+ Drag threshold
532
+ Successful completion
533
+ ```
534
+
535
+ .
536
+
537
+ # 51. HAPTIC RESTRAINT
538
+
539
+ Do not vibrate for every tap.
540
+
541
+ Excessive haptics become noise.
542
+
543
+ # 52. ACCESSIBILITY + GESTURES
544
+
545
+ Every important gesture should have an accessible alternative where necessary.
546
+
547
+ # 53. ASSISTIVE TECHNOLOGY
548
+
549
+ Do not assume users interact through touch alone.
550
+
551
+ Important operations should remain exposed semantically.
552
+
553
+ # 54. MOTOR ACCESSIBILITY
554
+
555
+ Design for users who may have:
556
+
557
+ ```text
558
+ limited precision
559
+ slow movement
560
+ tremor
561
+ difficulty performing multi-finger gestures
562
+ ```
563
+
564
+ .
565
+
566
+ # 55. GESTURE COMPLEXITY
567
+
568
+ Prefer:
569
+
570
+ ```text
571
+ Tap
572
+ ```
573
+
574
+ over:
575
+
576
+ ```text
577
+ Long press + swipe + release
578
+ ```
579
+
580
+ unless the advanced gesture provides substantial value.
581
+
582
+ # 56. CUSTOM GESTURES
583
+
584
+ Before creating a custom gesture, evaluate:
585
+
586
+ ```text
587
+ Discoverability
588
+ Accessibility
589
+ Conflict
590
+ Necessity
591
+ Consistency
592
+ ```
593
+
594
+ .
595
+
596
+ # 57. GESTURE ALTERNATIVES
597
+
598
+ If a custom gesture is valuable, provide an alternative through:
599
+
600
+ ```text
601
+ Button
602
+ Context menu
603
+ Toolbar
604
+ Accessibility action
605
+ ```
606
+
607
+ where appropriate.
608
+
609
+ # 58. GESTURE + BUTTON
610
+
611
+ Gestures and visible controls can coexist.
612
+
613
+ Example:
614
+
615
+ ```text
616
+ Swipe to delete
617
+ +
618
+ Delete in context menu
619
+ ```
620
+
621
+ .
622
+
623
+ # 59. GESTURE + CONTEXT MENU
624
+
625
+ Context menus are particularly useful for exposing actions hidden behind
626
+ long press or swipe interactions.
627
+
628
+ # 60. CONTEXTUAL ACTIONS
629
+
630
+ Actions should appear near the object they affect whenever practical.
631
+
632
+ # 61. DRAG REORDERING
633
+
634
+ A reorder interaction should communicate:
635
+
636
+ ```text
637
+ Selected item
638
+ Current position
639
+ Possible destination
640
+ Final position
641
+ ```
642
+
643
+ .
644
+
645
+ # 62. REORDER FEEDBACK
646
+
647
+ The dragged item may visually separate from the list to communicate that it is
648
+ being moved.
649
+
650
+ # 63. DRAG CANCEL
651
+
652
+ Dragging outside valid destinations should not accidentally destroy the item.
653
+
654
+ # 64. DRAG AND DROP
655
+
656
+ For advanced workflows:
657
+
658
+ ```text
659
+ Source
660
+ ↓
661
+ Drag
662
+ ↓
663
+ Destination
664
+ ↓
665
+ Drop
666
+ ```
667
+
668
+ should expose destination affordances.
669
+
670
+ # 65. DRAG PREVIEW
671
+
672
+ A dragged object may use a lightweight preview that communicates what is being
673
+ moved.
674
+
675
+ # 66. GESTURE + MODALITY
676
+
677
+ Gestures should not accidentally trigger actions underneath overlays, sheets,
678
+ or modals.
679
+
680
+ # 67. MODAL GESTURES
681
+
682
+ Sheets may support gestures such as:
683
+
684
+ ```text
685
+ Swipe down
686
+ Drag
687
+ ```
688
+
689
+ when consistent with the interaction model.
690
+
691
+ # 68. SHEET DISMISSAL
692
+
693
+ Dismissal should feel physically connected to the user's gesture.
694
+
695
+ Do not allow a tiny movement to unexpectedly close an important sheet.
696
+
697
+ # 69. DESTRUCTIVE GESTURES
698
+
699
+ For irreversible operations:
700
+
701
+ ```text
702
+ Gesture
703
+ ↓
704
+ Confirmation
705
+ ```
706
+
707
+ may be necessary.
708
+
709
+ For reversible operations:
710
+
711
+ ```text
712
+ Gesture
713
+ ↓
714
+ Immediate action
715
+ ↓
716
+ Undo
717
+ ```
718
+
719
+ can be better.
720
+
721
+ # 70. GESTURE CONFIRMATION
722
+
723
+ Do not ask for confirmation after every gesture.
724
+
725
+ Confirmation should correspond to consequence.
726
+
727
+ # 71. GESTURE ERROR RECOVERY
728
+
729
+ If a gesture triggers the wrong action:
730
+
731
+ ```text
732
+ Recover quickly
733
+ Preserve context
734
+ Offer undo where appropriate
735
+ ```
736
+
737
+ .
738
+
739
+ # 72. TOUCH + LOADING
740
+
741
+ When an action is processing, prevent duplicate gestures when necessary.
742
+
743
+ # 73. TOUCH + ASYNC
744
+
745
+ Example:
746
+
747
+ ```text
748
+ Tap Play
749
+ ↓
750
+ Loading
751
+ ↓
752
+ Playback
753
+ ```
754
+
755
+ The interface should avoid accepting repeated taps that create duplicate
756
+ operations.
757
+
758
+ # 74. GESTURE FEEDBACK STATES
759
+
760
+ A complex gesture may use:
761
+
762
+ ```text
763
+ Idle
764
+ Pressed
765
+ Tracking
766
+ Threshold
767
+ Committed
768
+ Cancelled
769
+ Completed
770
+ ```
771
+
772
+ .
773
+
774
+ # 75. GESTURE STATE MACHINE
775
+
776
+ Conceptually:
777
+
778
+ ```text
779
+ Idle
780
+ ↓
781
+ Touch begins
782
+ ↓
783
+ Tracking
784
+ ├── Cancel → Idle
785
+ └── Threshold → Active
786
+ ↓
787
+ Commit
788
+ ↓
789
+ Complete
790
+ ```
791
+
792
+ .
793
+
794
+ # 76. TOUCH COORDINATE SYSTEM
795
+
796
+ Custom gestures should account for:
797
+
798
+ ```text
799
+ screen coordinates
800
+ safe areas
801
+ scroll offsets
802
+ transforms
803
+ nested containers
804
+ ```
805
+
806
+ .
807
+
808
+ # 77. GESTURE HIT TESTING
809
+
810
+ Hit testing should be deterministic.
811
+
812
+ Do not let overlapping components randomly compete for touch.
813
+
814
+ # 78. GESTURE CAPTURE
815
+
816
+ A component should capture a gesture only when it has sufficient evidence that
817
+ the gesture belongs to it.
818
+
819
+ # 79. SCROLL VS HORIZONTAL ACTION
820
+
821
+ For a horizontal swipe inside a vertical list:
822
+
823
+ ```text
824
+ Initial movement
825
+ ↓
826
+ Determine dominant direction
827
+ ↓
828
+ Lock interaction
829
+ ```
830
+
831
+ .
832
+
833
+ # 80. GESTURE PHYSICS
834
+
835
+ Use physics when it improves:
836
+
837
+ ```text
838
+ continuity
839
+ feedback
840
+ spatial understanding
841
+ ```
842
+
843
+ Do not use physics simply because it looks impressive.
844
+
845
+ # 81. SPRING ANIMATION
846
+
847
+ Spring behavior can be useful for:
848
+
849
+ ```text
850
+ sheet movement
851
+ dragging
852
+ snap points
853
+ interactive controls
854
+ ```
855
+
856
+ .
857
+
858
+ # 82. SNAP POINTS
859
+
860
+ Snap points should correspond to meaningful states.
861
+
862
+ Avoid arbitrary intermediate positions.
863
+
864
+ # 83. INTERACTIVE DISMISSAL
865
+
866
+ For interactive dismissal:
867
+
868
+ ```text
869
+ finger movement
870
+ ≈
871
+ visual movement
872
+ ```
873
+
874
+ The user should feel direct manipulation.
875
+
876
+ # 84. GESTURE COMPLETION
877
+
878
+ After release, the interface should clearly settle into a valid state.
879
+
880
+ # 85. VELOCITY-BASED COMPLETION
881
+
882
+ For dismissals or paging, velocity can determine whether an interaction commits,
883
+ but the result must remain predictable.
884
+
885
+ # 86. ACCESSIBILITY ALTERNATIVE
886
+
887
+ Every essential custom gesture should have an equivalent semantic action where
888
+ appropriate.
889
+
890
+ # 87. REDUCED MOTION
891
+
892
+ Respect reduced-motion preferences.
893
+
894
+ Gesture feedback should remain understandable without elaborate animation.
895
+
896
+ # 88. HAPTIC ACCESSIBILITY
897
+
898
+ Do not make essential state communication depend only on haptics.
899
+
900
+ # 89. AUDIO FEEDBACK
901
+
902
+ When appropriate, sound may supplement gesture feedback.
903
+
904
+ Never make essential information dependent solely on sound.
905
+
906
+ # 90. MULTIMODAL FEEDBACK
907
+
908
+ Strong interactions may combine:
909
+
910
+ ```text
911
+ Visual
912
+ +
913
+ Haptic
914
+ +
915
+ Audio
916
+ ```
917
+
918
+ but each should remain proportionate.
919
+
920
+ # 91. GESTURE CONSISTENCY ACROSS APP
921
+
922
+ Create a gesture vocabulary.
923
+
924
+ Example:
925
+
926
+ ```text
927
+ Tap → activate
928
+ Long press → secondary actions
929
+ Swipe → contextual action
930
+ Drag → reposition
931
+ Pinch → zoom
932
+ ```
933
+
934
+ Do not constantly reinvent meanings.
935
+
936
+ # 92. GESTURE VOCABULARY
937
+
938
+ Document application-specific gestures in the design system.
939
+
940
+ Example:
941
+
942
+ ```text
943
+ Gesture Meaning
944
+ ──────────────────────────────
945
+ Tap Open
946
+ Long press More
947
+ Swipe left Archive
948
+ Swipe right Mark
949
+ Drag Reorder
950
+ Pinch Zoom
951
+ ```
952
+
953
+ .
954
+
955
+ # 93. DISCOVERABILITY HINTS
956
+
957
+ For important custom gestures, subtle hints may be appropriate.
958
+
959
+ Examples:
960
+
961
+ ```text
962
+ Swipe affordance
963
+ Handle
964
+ Animated first-use hint
965
+ Contextual tooltip
966
+ ```
967
+
968
+ Avoid persistent tutorial clutter.
969
+
970
+ # 94. FIRST-USE GESTURES
971
+
972
+ If a gesture is central to the product, consider teaching it briefly during
973
+ first use.
974
+
975
+ # 95. GESTURE TUTORIALS
976
+
977
+ Tutorials should be:
978
+
979
+ ```text
980
+ Short
981
+ Contextual
982
+ Dismissible
983
+ Non-blocking
984
+ ```
985
+
986
+ .
987
+
988
+ # 96. GESTURE MEMORY
989
+
990
+ Do not require users to remember many unrelated gestures.
991
+
992
+ The gesture vocabulary should remain small.
993
+
994
+ # 97. POWER USER GESTURES
995
+
996
+ Advanced gestures may exist for expert users.
997
+
998
+ They should accelerate workflows without becoming the only path.
999
+
1000
+ # 98. GESTURE + KEYBOARD
1001
+
1002
+ On iPad or keyboard-equipped devices, consider equivalent keyboard commands
1003
+ for important operations.
1004
+
1005
+ # 99. POINTER SUPPORT
1006
+
1007
+ On iPad and pointer-enabled environments, touch interactions should coexist
1008
+ with pointer interaction where relevant.
1009
+
1010
+ # 100. TOUCH + POINTER
1011
+
1012
+ Do not assume:
1013
+
1014
+ ```text
1015
+ touch interaction = pointer interaction
1016
+ ```
1017
+
1018
+ The interaction model may need device-specific refinement.
1019
+
1020
+ # 101. GESTURE TESTING
1021
+
1022
+ Test gestures with:
1023
+
1024
+ ```text
1025
+ Slow movement
1026
+ Fast movement
1027
+ Diagonal movement
1028
+ Edge movement
1029
+ Interrupted movement
1030
+ Repeated gestures
1031
+ ```
1032
+
1033
+ .
1034
+
1035
+ # 102. EDGE CASES
1036
+
1037
+ Test:
1038
+
1039
+ ```text
1040
+ Gesture begins on control
1041
+ Gesture begins during scroll
1042
+ Gesture interrupted by navigation
1043
+ Gesture interrupted by keyboard
1044
+ Gesture interrupted by notification
1045
+ ```
1046
+
1047
+ .
1048
+
1049
+ # 103. GESTURE FAILURE MODES
1050
+
1051
+ Watch for:
1052
+
1053
+ ```text
1054
+ Accidental activation
1055
+ Gesture conflict
1056
+ Invisible affordance
1057
+ Excessive precision
1058
+ Unexpected dismissal
1059
+ Duplicate action
1060
+ ```
1061
+
1062
+ .
1063
+
1064
+ # 104. GESTURE PERFORMANCE
1065
+
1066
+ Gestures must remain responsive under:
1067
+
1068
+ ```text
1069
+ large lists
1070
+ heavy rendering
1071
+ network activity
1072
+ animations
1073
+ background processing
1074
+ ```
1075
+
1076
+ .
1077
+
1078
+ # 105. FRAME RESPONSIVENESS
1079
+
1080
+ Interactive movement should remain visually synchronized with the user's
1081
+ gesture.
1082
+
1083
+ # 106. JS GESTURE PERFORMANCE
1084
+
1085
+ In React Native, gesture handling should minimize unnecessary JS-thread work
1086
+ during continuous interactions.
1087
+
1088
+ Prefer appropriate native/UI-thread gesture mechanisms where architecture
1089
+ supports them.
1090
+
1091
+ # 107. ANIMATION + GESTURE
1092
+
1093
+ Interactive animation should follow the gesture directly where possible.
1094
+
1095
+ Avoid:
1096
+
1097
+ ```text
1098
+ gesture
1099
+ ↓
1100
+ JS delay
1101
+ ↓
1102
+ animation catches up
1103
+ ```
1104
+
1105
+ .
1106
+
1107
+ # 108. GESTURE MEMORY
1108
+
1109
+ Avoid storing unnecessary gesture state that survives beyond the interaction.
1110
+
1111
+ # 109. GESTURE CLEANUP
1112
+
1113
+ Interrupted gestures must correctly clean up:
1114
+
1115
+ ```text
1116
+ listeners
1117
+ animations
1118
+ temporary state
1119
+ drag state
1120
+ locks
1121
+ ```
1122
+
1123
+ .
1124
+
1125
+ # 110. GESTURE SECURITY
1126
+
1127
+ Gestures must not accidentally bypass:
1128
+
1129
+ ```text
1130
+ authorization
1131
+ confirmation
1132
+ privacy controls
1133
+ ```
1134
+
1135
+ .
1136
+
1137
+ # 111. GESTURE REVIEW
1138
+
1139
+ Before shipping, evaluate:
1140
+
1141
+ ```text
1142
+ Purpose
1143
+ Discoverability
1144
+ Consistency
1145
+ Touch target
1146
+ Conflict handling
1147
+ Feedback
1148
+ Accessibility
1149
+ Performance
1150
+ Recovery
1151
+ ```
1152
+
1153
+ .
1154
+
1155
+ # 112. GESTURE REVIEW SCORE
1156
+
1157
+ ```text
1158
+ Purpose 10
1159
+ Predictability 15
1160
+ Responsiveness 15
1161
+ Discoverability 10
1162
+ Accessibility 15
1163
+ Consistency 10
1164
+ Feedback 10
1165
+ Conflict handling 5
1166
+ Recovery 5
1167
+ Performance 5
1168
+ ──────────────────────────
1169
+ Total 100
1170
+ ```
1171
+
1172
+ Interpretation:
1173
+
1174
+ ```text
1175
+ 95–100 Exceptional
1176
+ 90–94 Excellent
1177
+ 80–89 Strong
1178
+ 70–79 Needs refinement
1179
+ 60–69 Weak
1180
+ <60 Redesign
1181
+ ```
1182
+
1183
+ # 113. AGENT GESTURE DECISION TREE
1184
+
1185
+ ```text
1186
+ What does the user need to do?
1187
+ ↓
1188
+ Activate something?
1189
+ └── Tap
1190
+
1191
+ Need secondary actions?
1192
+ └── Context menu / long press
1193
+
1194
+ Need contextual list actions?
1195
+ └── Swipe
1196
+
1197
+ Need to move something?
1198
+ └── Drag
1199
+
1200
+ Need to inspect larger content?
1201
+ └── Pinch / zoom
1202
+
1203
+ Need to dismiss a sheet?
1204
+ └── Drag / swipe
1205
+
1206
+ Need to navigate?
1207
+ └── Platform-aligned navigation gesture
1208
+ ```
1209
+
1210
+ # 114. AGENT GESTURE DESIGN FLOW
1211
+
1212
+ ```text
1213
+ User intent
1214
+ ↓
1215
+ Action importance
1216
+ ↓
1217
+ Gesture necessity
1218
+ ↓
1219
+ Gesture choice
1220
+ ↓
1221
+ Touch target
1222
+ ↓
1223
+ Gesture recognition
1224
+ ↓
1225
+ Conflict resolution
1226
+ ↓
1227
+ Feedback
1228
+ ↓
1229
+ Commit / cancel
1230
+ ↓
1231
+ Recovery
1232
+ ↓
1233
+ Accessibility
1234
+ ↓
1235
+ Performance
1236
+ ```
1237
+
1238
+ .
1239
+
1240
+ # 115. FINAL GESTURE PRINCIPLE
1241
+
1242
+ A great gesture feels like:
1243
+
1244
+ ```text
1245
+ "I naturally knew what to do."
1246
+ ```
1247
+
1248
+ not:
1249
+
1250
+ ```text
1251
+ "I discovered a secret combination."
1252
+ ```
1253
+
1254
+ # 116. FINAL AGENT DIRECTIVE
1255
+
1256
+ Before creating a custom gesture, ask:
1257
+
1258
+ ```text
1259
+ Is the action important?
1260
+ Is the gesture discoverable?
1261
+ Does it conflict with system behavior?
1262
+ Is there a visible alternative?
1263
+ Can users with motor/accessibility needs perform it?
1264
+ Can the gesture be cancelled?
1265
+ Can mistakes be recovered?
1266
+ ```
1267
+
1268
+ If the answers are weak, use a conventional control instead.
1269
+
1270
+ The goal is not to maximize gestures.
1271
+
1272
+ The goal is to make **interaction feel inevitable**.