@elsahafy/ux-mcp-server 2.0.0 → 4.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.
@@ -0,0 +1,537 @@
1
+ {
2
+ "name": "Mobile-Specific UX Patterns",
3
+ "description": "Comprehensive guide to mobile-first design, touch interactions, navigation patterns, and mobile-specific considerations",
4
+ "mobile_first_principles": {
5
+ "definition": "Design for mobile first, then scale up to larger screens",
6
+ "benefits": [
7
+ "Forces prioritization of content",
8
+ "Better performance (start lean)",
9
+ "Easier to scale up than down",
10
+ "Majority of traffic is mobile",
11
+ "Progressive enhancement mindset"
12
+ ],
13
+ "approach": {
14
+ "start": "Design mobile layout first (320-375px)",
15
+ "enhance": "Add features for tablet (768px+)",
16
+ "expand": "Full desktop experience (1024px+)"
17
+ },
18
+ "css_strategy": "Mobile styles first, use @media (min-width) for larger screens"
19
+ },
20
+ "touch_interactions": {
21
+ "touch_targets": {
22
+ "minimum_size": {
23
+ "apple": "44x44 pixels (44pt)",
24
+ "android": "48x48 pixels (48dp)",
25
+ "recommended": "48x48 pixels minimum",
26
+ "comfortable": "56x56 pixels or larger"
27
+ },
28
+ "spacing": {
29
+ "minimum": "8px between touch targets",
30
+ "comfortable": "16px between targets",
31
+ "avoid": "Adjacent buttons without spacing"
32
+ },
33
+ "applies_to": [
34
+ "Buttons",
35
+ "Links",
36
+ "Form inputs",
37
+ "Checkboxes/radio buttons",
38
+ "Toggle switches",
39
+ "Navigation items",
40
+ "Icons"
41
+ ],
42
+ "implementation": "Use padding to increase clickable area without increasing visual size"
43
+ },
44
+ "gestures": {
45
+ "tap": {
46
+ "description": "Single finger touch",
47
+ "use": "Primary interaction (buttons, links)",
48
+ "feedback": "Provide visual feedback (highlight, ripple)",
49
+ "delay": "250-350ms delay on tap (mobile browsers)",
50
+ "solution": "Use touch events or touch-action: manipulation"
51
+ },
52
+ "double_tap": {
53
+ "description": "Two quick taps",
54
+ "use": "Zoom in (browsers), like (social apps)",
55
+ "avoid": "Conflicts with single tap, causes 300ms delay",
56
+ "note": "Less common in modern apps"
57
+ },
58
+ "long_press": {
59
+ "description": "Touch and hold",
60
+ "use": "Context menus, additional options, reordering",
61
+ "duration": "500-800ms typical",
62
+ "feedback": "Haptic + visual",
63
+ "examples": "Show context menu, enter edit mode"
64
+ },
65
+ "swipe": {
66
+ "description": "Quick slide gesture",
67
+ "directions": "Left, right, up, down",
68
+ "uses": {
69
+ "horizontal": "Navigate between pages, dismiss items",
70
+ "vertical": "Scroll, pull-to-refresh, swipe up for more"
71
+ },
72
+ "examples": [
73
+ "Swipe left to delete (iOS)",
74
+ "Swipe right to go back",
75
+ "Swipe between tabs/screens"
76
+ ]
77
+ },
78
+ "drag": {
79
+ "description": "Press and move",
80
+ "use": "Reorder lists, move items, sliders",
81
+ "feedback": "Visual indication item is dragging",
82
+ "drop_zones": "Clear indication where item can be dropped"
83
+ },
84
+ "pinch": {
85
+ "description": "Two fingers moving together/apart",
86
+ "use": "Zoom in/out on images, maps",
87
+ "default": "Disabled on most web content",
88
+ "enable": "For images, maps, media viewers"
89
+ },
90
+ "rotate": {
91
+ "description": "Two fingers rotating",
92
+ "use": "Rotate images, maps, specialized apps",
93
+ "rare": "Not common in standard UIs"
94
+ },
95
+ "edge_swipe": {
96
+ "description": "Swipe from screen edge",
97
+ "ios": "Back gesture (left edge)",
98
+ "android": "Open navigation drawer (left edge)",
99
+ "note": "System gestures - avoid conflicting"
100
+ }
101
+ },
102
+ "haptic_feedback": {
103
+ "description": "Vibration feedback for interactions",
104
+ "when_to_use": [
105
+ "Confirmations",
106
+ "Errors/warnings",
107
+ "Toggle switches",
108
+ "Button presses (optional)",
109
+ "Drag and drop events"
110
+ ],
111
+ "patterns": {
112
+ "light": "Subtle feedback (toggle, selection)",
113
+ "medium": "Standard feedback (button press)",
114
+ "heavy": "Strong feedback (error, warning)",
115
+ "success": "Completion pattern",
116
+ "error": "Failure pattern"
117
+ },
118
+ "avoid": "Overuse - can be annoying",
119
+ "accessibility": "Don't rely on haptics alone"
120
+ }
121
+ },
122
+ "navigation_patterns": {
123
+ "bottom_navigation": {
124
+ "description": "Tab bar at bottom of screen",
125
+ "use_when": "3-5 top-level destinations",
126
+ "benefits": ["Easy thumb reach", "Always visible", "Clear structure"],
127
+ "limitations": "Maximum 5 items",
128
+ "items": {
129
+ "count": "3-5 destinations",
130
+ "labels": "Short, 1-2 words",
131
+ "icons": "Clear, recognizable",
132
+ "active_state": "Color + icon filled"
133
+ },
134
+ "avoid": [
135
+ "More than 5 items",
136
+ "Nested navigation",
137
+ "Long labels",
138
+ "Scrolling bottom nav"
139
+ ],
140
+ "examples": "Instagram, Twitter, Apple Music"
141
+ },
142
+ "tab_bar": {
143
+ "description": "Horizontal tabs for category switching",
144
+ "placement": "Below header, scrollable if many",
145
+ "use_when": "Same-level content categories",
146
+ "interaction": "Swipe to switch + tap tabs",
147
+ "indicator": "Line or background showing active tab",
148
+ "scroll": "Allow horizontal scroll if > 4 tabs"
149
+ },
150
+ "hamburger_menu": {
151
+ "description": "Three-line icon revealing navigation",
152
+ "placement": "Top left or top right",
153
+ "pros": ["Saves space", "Can hold many items"],
154
+ "cons": ["Hidden navigation", "Extra tap required", "Lower discoverability"],
155
+ "use_when": "Many navigation items, secondary nav, settings",
156
+ "avoid": "Primary navigation on mobile (use bottom nav instead)",
157
+ "drawer_style": "Slide in from left or right"
158
+ },
159
+ "top_navigation": {
160
+ "description": "Header with logo and key actions",
161
+ "typical_items": ["Back button", "Title", "Search", "Actions (2-3 max)"],
162
+ "avoid": "Too many actions (use overflow menu)",
163
+ "scroll_behavior": {
164
+ "fixed": "Always visible",
165
+ "hide_on_scroll": "Hide when scrolling down, show when scrolling up",
166
+ "collapse": "Shrink on scroll"
167
+ }
168
+ },
169
+ "floating_action_button": {
170
+ "description": "Circular button for primary action",
171
+ "placement": "Bottom right corner",
172
+ "use_when": "One clear primary action (create, add, compose)",
173
+ "size": "56x56dp (Android), 44x44pt minimum (iOS)",
174
+ "avoid": "Multiple FABs, unclear actions",
175
+ "examples": "New email, create post, add item"
176
+ },
177
+ "breadcrumbs": {
178
+ "mobile": "Generally avoid or simplify to just back button",
179
+ "alternative": "Use clear page titles + back button",
180
+ "exception": "E-commerce category navigation"
181
+ },
182
+ "hierarchical_navigation": {
183
+ "pattern": "Drill down into subcategories",
184
+ "back_button": "Always provide clear way to go back",
185
+ "header_title": "Show current location",
186
+ "breadcrumb": "Optional: Home > Category > Current"
187
+ }
188
+ },
189
+ "thumb_zones": {
190
+ "description": "Areas of screen easily reachable by thumb",
191
+ "zones": {
192
+ "easy": {
193
+ "location": "Bottom third, center",
194
+ "reachability": "One-handed, comfortable",
195
+ "use_for": "Primary actions, navigation, frequent interactions"
196
+ },
197
+ "stretch": {
198
+ "location": "Top corners, far edges",
199
+ "reachability": "Requires stretching or shifting grip",
200
+ "use_for": "Secondary actions, less frequent interactions"
201
+ },
202
+ "hard": {
203
+ "location": "Top center, opposite top corner",
204
+ "reachability": "Requires two hands or grip shift",
205
+ "use_for": "Infrequent actions, settings"
206
+ }
207
+ },
208
+ "one_handed_use": {
209
+ "right_handed": "Bottom right most reachable",
210
+ "left_handed": "Bottom left most reachable",
211
+ "design_for": "Both - important actions in bottom center"
212
+ },
213
+ "large_phones": {
214
+ "issue": "Top of screen hard to reach",
215
+ "solution": ["Reachability mode", "Bottom navigation", "Floating elements"]
216
+ }
217
+ },
218
+ "screen_sizes": {
219
+ "breakpoints": {
220
+ "small_phone": "320px - 375px (iPhone SE, older phones)",
221
+ "standard_phone": "375px - 414px (Most phones)",
222
+ "large_phone": "414px - 428px (Plus models, Max)",
223
+ "tablet": "768px - 1024px",
224
+ "desktop": "1024px+"
225
+ },
226
+ "design_for": {
227
+ "minimum": "320px (smallest still in use)",
228
+ "optimal": "375px (most common)",
229
+ "test_at": "320px, 375px, 414px, 768px"
230
+ },
231
+ "responsive_images": {
232
+ "srcset": "Provide multiple image sizes",
233
+ "picture": "Art direction for different layouts",
234
+ "lazy_loading": "Load images as needed"
235
+ }
236
+ },
237
+ "mobile_forms": {
238
+ "input_types": {
239
+ "tel": "Shows number pad with symbols",
240
+ "email": "Shows @ and .com",
241
+ "url": "Shows .com and /",
242
+ "number": "Shows number pad",
243
+ "date": "Shows date picker",
244
+ "search": "Shows search-optimized keyboard"
245
+ },
246
+ "inputmode": {
247
+ "numeric": "Number pad without +/- symbols",
248
+ "decimal": "Number pad with decimal",
249
+ "tel": "Phone number pad",
250
+ "email": "Email keyboard",
251
+ "url": "URL keyboard"
252
+ },
253
+ "autocomplete": {
254
+ "enable": "Use HTML autocomplete attributes",
255
+ "benefits": "Faster input, fewer errors",
256
+ "attributes": "name, email, tel, address-line1, postal-code, cc-number"
257
+ },
258
+ "virtual_keyboard": {
259
+ "issue": "Covers bottom of screen",
260
+ "solutions": [
261
+ "Scroll field into view when focused",
262
+ "Fix submit button above keyboard",
263
+ "Adjust viewport on keyboard open",
264
+ "Provide 'Done' button to dismiss keyboard"
265
+ ]
266
+ },
267
+ "field_focus": {
268
+ "zoom": "iOS zooms if input < 16px",
269
+ "prevent": "Use 16px minimum font size for inputs",
270
+ "alternative": "Use viewport meta tag (not recommended)"
271
+ },
272
+ "layout": {
273
+ "single_column": "Always use single column on mobile",
274
+ "full_width": "Inputs should be full width (with padding)",
275
+ "spacing": "Ample touch target spacing (8-16px)",
276
+ "floating_labels": "Save vertical space"
277
+ }
278
+ },
279
+ "mobile_performance": {
280
+ "page_weight": {
281
+ "target": "< 1MB for initial load",
282
+ "images": "Optimize and compress",
283
+ "javascript": "Minimize and defer",
284
+ "css": "Inline critical CSS"
285
+ },
286
+ "loading_speed": {
287
+ "3g_network": "Test on slow connections",
288
+ "target": "< 3 seconds for main content",
289
+ "indicators": "Show loading states",
290
+ "progressive": "Load critical content first"
291
+ },
292
+ "battery_usage": {
293
+ "animations": "Use CSS animations (GPU accelerated)",
294
+ "polling": "Minimize background requests",
295
+ "location": "Request only when needed",
296
+ "video": "Don't autoplay"
297
+ },
298
+ "data_usage": {
299
+ "images": "Use WebP, lazy load",
300
+ "videos": "Offer quality options",
301
+ "fonts": "Limit web fonts",
302
+ "caching": "Cache aggressively"
303
+ }
304
+ },
305
+ "mobile_content": {
306
+ "readability": {
307
+ "font_size": "16px minimum (mobile)",
308
+ "line_height": "1.5-1.6 for body text",
309
+ "line_length": "35-50 characters on small screens",
310
+ "contrast": "Even more critical on mobile (glare, brightness)"
311
+ },
312
+ "hierarchy": {
313
+ "inverted_pyramid": "Most important content first",
314
+ "scannable": "Headings, bullets, short paragraphs",
315
+ "progressive_disclosure": "Show details on demand"
316
+ },
317
+ "images": {
318
+ "responsive": "Scale to screen size",
319
+ "touch_to_zoom": "Enable for detail viewing",
320
+ "captions": "Especially important on small screens",
321
+ "alt_text": "Critical for accessibility"
322
+ },
323
+ "videos": {
324
+ "controls": "Large, touch-friendly controls",
325
+ "captions": "Provide captions (often viewed muted)",
326
+ "fullscreen": "Support fullscreen mode",
327
+ "autoplay": "Avoid (data usage, battery, UX)"
328
+ }
329
+ },
330
+ "mobile_interactions": {
331
+ "pull_to_refresh": {
332
+ "description": "Pull down to reload content",
333
+ "use": "Feeds, inboxes, dynamic content",
334
+ "indicator": "Spinner or icon appears during pull",
335
+ "threshold": "~60-80px pull distance",
336
+ "avoid": "Conflicting with scroll"
337
+ },
338
+ "infinite_scroll": {
339
+ "description": "Load more content as user scrolls",
340
+ "use": "Feeds, search results, galleries",
341
+ "indicator": "Show loading at bottom",
342
+ "pagination_alternative": "Better for SEO, bookmarking",
343
+ "hybrid": "Load more + 'Show more' button"
344
+ },
345
+ "swipe_actions": {
346
+ "description": "Swipe to reveal actions",
347
+ "common": "Swipe left to delete, swipe right for more options",
348
+ "visual": "Show icons during swipe",
349
+ "confirmation": "Require for destructive actions",
350
+ "examples": "Email apps, to-do lists"
351
+ },
352
+ "modal_sheets": {
353
+ "description": "Bottom sheet that slides up",
354
+ "use": "Contextual actions, forms, filters",
355
+ "dismiss": "Swipe down or tap outside",
356
+ "sizes": "Half-screen, full-screen",
357
+ "better_than": "Full-screen modals (less disruptive)"
358
+ }
359
+ },
360
+ "mobile_specific_features": {
361
+ "offline_support": {
362
+ "service_workers": "Cache assets for offline use",
363
+ "offline_page": "Show helpful offline page",
364
+ "sync": "Sync when connection restored",
365
+ "indicator": "Show online/offline status"
366
+ },
367
+ "home_screen_install": {
368
+ "pwa": "Progressive Web App capabilities",
369
+ "manifest": "Web app manifest file",
370
+ "prompt": "Offer 'Add to Home Screen'",
371
+ "icon": "App icon for home screen",
372
+ "splash": "Loading screen"
373
+ },
374
+ "device_features": {
375
+ "camera": "Access for photos/scanning",
376
+ "location": "GPS for maps/location services",
377
+ "microphone": "Voice input",
378
+ "accelerometer": "Motion/tilt",
379
+ "permissions": "Request only when needed, explain why"
380
+ },
381
+ "notifications": {
382
+ "push": "Timely, relevant updates",
383
+ "opt_in": "Always require permission",
384
+ "frequency": "Don't spam",
385
+ "value": "Must provide value to user"
386
+ }
387
+ },
388
+ "common_mobile_patterns": {
389
+ "cards": {
390
+ "description": "Contained content units",
391
+ "benefits": "Touch-friendly, scannable, flexible",
392
+ "spacing": "8-16px between cards",
393
+ "content": "Keep concise on mobile",
394
+ "action": "Entire card often tappable"
395
+ },
396
+ "lists": {
397
+ "simple_list": "Single line items",
398
+ "detailed_list": "Multi-line with icon/image",
399
+ "action_items": "Swipe actions or long-press",
400
+ "dividers": "Light dividers between items"
401
+ },
402
+ "search": {
403
+ "placement": "Top of screen, prominent",
404
+ "auto_focus": "Optional - consider context",
405
+ "suggestions": "Show as user types",
406
+ "filters": "Accessible but not intrusive",
407
+ "clear_button": "X to clear search"
408
+ },
409
+ "filters_sorting": {
410
+ "trigger": "Filter icon or button",
411
+ "presentation": "Bottom sheet or modal",
412
+ "apply": "Show results count, apply button",
413
+ "clear": "Easy way to clear all filters"
414
+ },
415
+ "empty_states": {
416
+ "critical_on_mobile": "Limited space makes these stand out",
417
+ "illustration": "Simple, meaningful icon/image",
418
+ "message": "Concise, actionable",
419
+ "cta": "Clear next step"
420
+ },
421
+ "loading_states": {
422
+ "skeleton": "Show content structure while loading",
423
+ "spinner": "For unknown duration",
424
+ "progress": "For known duration",
425
+ "inline": "For partial updates"
426
+ }
427
+ },
428
+ "mobile_accessibility": {
429
+ "screen_readers": {
430
+ "voiceover": "iOS screen reader",
431
+ "talkback": "Android screen reader",
432
+ "testing": "Test with both",
433
+ "labels": "Descriptive aria-labels for icons"
434
+ },
435
+ "touch_targets": {
436
+ "minimum": "44x44px (see touch_targets above)",
437
+ "spacing": "8px minimum between",
438
+ "feedback": "Clear visual and haptic feedback"
439
+ },
440
+ "contrast": {
441
+ "even_more_critical": "Outdoor viewing, glare",
442
+ "minimum": "4.5:1 for text",
443
+ "test": "Test in bright sunlight if possible"
444
+ },
445
+ "motion": {
446
+ "reduce_motion": "Respect prefers-reduced-motion",
447
+ "parallax": "Avoid or make optional",
448
+ "autoplay": "Don't autoplay animations"
449
+ }
450
+ },
451
+ "testing": {
452
+ "devices": {
453
+ "must_test": [
454
+ "Small phone (iPhone SE, 320px)",
455
+ "Standard phone (iPhone 14, 375px)",
456
+ "Large phone (iPhone 14 Pro Max, 428px)",
457
+ "Android phone (various sizes)",
458
+ "Tablet (iPad, 768px+)"
459
+ ]
460
+ },
461
+ "browsers": {
462
+ "safari": "iOS default",
463
+ "chrome": "Android default, iOS option",
464
+ "firefox": "Alternative",
465
+ "samsung_internet": "Popular on Android"
466
+ },
467
+ "conditions": {
468
+ "slow_network": "Test on 3G/slow 4G",
469
+ "offline": "Test offline functionality",
470
+ "low_battery": "Check battery usage",
471
+ "interruptions": "Phone calls, notifications"
472
+ },
473
+ "real_devices": "Always test on real devices, not just emulators"
474
+ },
475
+ "best_practices": [
476
+ "Design mobile-first, then scale up",
477
+ "Touch targets minimum 44x44px with 8px spacing",
478
+ "Place important actions in thumb-reachable zones",
479
+ "Use appropriate input types and inputmode",
480
+ "Keep forms simple, single column",
481
+ "Provide clear visual feedback for all interactions",
482
+ "Use bottom navigation for 3-5 primary destinations",
483
+ "Optimize images and assets for mobile",
484
+ "Test on real devices with slow networks",
485
+ "Respect prefers-reduced-motion",
486
+ "Don't rely on hover states",
487
+ "Make tap targets obvious (don't hide in text)",
488
+ "Support landscape orientation",
489
+ "Handle virtual keyboard gracefully",
490
+ "Provide offline support where possible",
491
+ "Use system fonts when possible (performance)",
492
+ "Minimize page weight (< 1MB)",
493
+ "Load critical content first",
494
+ "Use native patterns users expect",
495
+ "Test with screen readers (VoiceOver, TalkBack)"
496
+ ],
497
+ "anti_patterns": [
498
+ "Touch targets smaller than 44x44px",
499
+ "Relying on hover states",
500
+ "Horizontal scrolling (except carousels)",
501
+ "Tiny text (< 16px)",
502
+ "Pop-ups and interstitials that block content",
503
+ "Auto-playing videos with sound",
504
+ "Fixed elements that cover content",
505
+ "Infinite scroll without pagination alternative",
506
+ "Hiding critical nav in hamburger only",
507
+ "Not handling virtual keyboard",
508
+ "Disabling zoom",
509
+ "Click/tap delays",
510
+ "Not testing on real devices",
511
+ "Overuse of modals",
512
+ "Conflicting gesture interactions",
513
+ "Poor contrast on mobile",
514
+ "Complex multi-column layouts",
515
+ "Long unbreakable text strings",
516
+ "Not providing loading states",
517
+ "Ignoring offline scenarios"
518
+ ],
519
+ "mobile_vs_desktop": {
520
+ "different_contexts": {
521
+ "mobile": "On-the-go, interrupted, one-handed, touch",
522
+ "desktop": "Focused, multi-tasking, mouse/keyboard"
523
+ },
524
+ "different_capabilities": {
525
+ "mobile": "Camera, GPS, motion, smaller screen",
526
+ "desktop": "Larger screen, faster processing, mouse precision"
527
+ },
528
+ "design_implications": [
529
+ "Mobile needs larger touch targets",
530
+ "Mobile needs simpler navigation",
531
+ "Mobile needs progressive disclosure",
532
+ "Desktop can show more at once",
533
+ "Desktop can use hover states",
534
+ "Desktop can have complex multi-column layouts"
535
+ ]
536
+ }
537
+ }