trae-starter 0.0.1

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 (83) hide show
  1. package/README.md +45 -0
  2. package/bin/cli.js +33 -0
  3. package/package.json +25 -0
  4. package/public/app.js +263 -0
  5. package/public/index.html +123 -0
  6. package/server/api.js +181 -0
  7. package/server/index.js +38 -0
  8. package/templates/proto/.agents/skills/ui-ux-pro-max/SKILL.md +659 -0
  9. package/templates/proto/.agents/skills/ui-ux-pro-max/data/_sync_all.py +414 -0
  10. package/templates/proto/.agents/skills/ui-ux-pro-max/data/app-interface.csv +31 -0
  11. package/templates/proto/.agents/skills/ui-ux-pro-max/data/charts.csv +26 -0
  12. package/templates/proto/.agents/skills/ui-ux-pro-max/data/colors.csv +162 -0
  13. package/templates/proto/.agents/skills/ui-ux-pro-max/data/design.csv +1776 -0
  14. package/templates/proto/.agents/skills/ui-ux-pro-max/data/draft.csv +1779 -0
  15. package/templates/proto/.agents/skills/ui-ux-pro-max/data/google-fonts.csv +1924 -0
  16. package/templates/proto/.agents/skills/ui-ux-pro-max/data/icons.csv +106 -0
  17. package/templates/proto/.agents/skills/ui-ux-pro-max/data/landing.csv +35 -0
  18. package/templates/proto/.agents/skills/ui-ux-pro-max/data/products.csv +162 -0
  19. package/templates/proto/.agents/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  20. package/templates/proto/.agents/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  21. package/templates/proto/.agents/skills/ui-ux-pro-max/data/styles.csv +85 -0
  22. package/templates/proto/.agents/skills/ui-ux-pro-max/data/typography.csv +74 -0
  23. package/templates/proto/.agents/skills/ui-ux-pro-max/data/ui-reasoning.csv +162 -0
  24. package/templates/proto/.agents/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  25. package/templates/proto/.agents/skills/ui-ux-pro-max/scripts/core.py +247 -0
  26. package/templates/proto/.agents/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  27. package/templates/proto/.agents/skills/ui-ux-pro-max/scripts/search.py +114 -0
  28. package/templates/proto/.trae/skills/preview-manager/SKILL.md +37 -0
  29. package/templates/proto/.trae/skills/ui-ux-pro-max/SKILL.md +659 -0
  30. package/templates/proto/.trae/skills/ui-ux-pro-max/data/_sync_all.py +414 -0
  31. package/templates/proto/.trae/skills/ui-ux-pro-max/data/app-interface.csv +31 -0
  32. package/templates/proto/.trae/skills/ui-ux-pro-max/data/charts.csv +26 -0
  33. package/templates/proto/.trae/skills/ui-ux-pro-max/data/colors.csv +162 -0
  34. package/templates/proto/.trae/skills/ui-ux-pro-max/data/design.csv +1776 -0
  35. package/templates/proto/.trae/skills/ui-ux-pro-max/data/draft.csv +1779 -0
  36. package/templates/proto/.trae/skills/ui-ux-pro-max/data/google-fonts.csv +1924 -0
  37. package/templates/proto/.trae/skills/ui-ux-pro-max/data/icons.csv +106 -0
  38. package/templates/proto/.trae/skills/ui-ux-pro-max/data/landing.csv +35 -0
  39. package/templates/proto/.trae/skills/ui-ux-pro-max/data/products.csv +162 -0
  40. package/templates/proto/.trae/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  41. package/templates/proto/.trae/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  42. package/templates/proto/.trae/skills/ui-ux-pro-max/data/styles.csv +85 -0
  43. package/templates/proto/.trae/skills/ui-ux-pro-max/data/typography.csv +74 -0
  44. package/templates/proto/.trae/skills/ui-ux-pro-max/data/ui-reasoning.csv +162 -0
  45. package/templates/proto/.trae/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  46. package/templates/proto/.trae/skills/ui-ux-pro-max/scripts/core.py +247 -0
  47. package/templates/proto/.trae/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  48. package/templates/proto/.trae/skills/ui-ux-pro-max/scripts/search.py +114 -0
  49. package/templates/proto/README.md +77 -0
  50. package/templates/proto/agent.md +361 -0
  51. package/templates/proto/eslint.config.js +23 -0
  52. package/templates/proto/index.html +13 -0
  53. package/templates/proto/package.json +39 -0
  54. package/templates/proto/pnpm-lock.yaml +2401 -0
  55. package/templates/proto/postcss.config.js +6 -0
  56. package/templates/proto/public/favicon.svg +1 -0
  57. package/templates/proto/public/icons.svg +24 -0
  58. package/templates/proto/skills-lock.json +10 -0
  59. package/templates/proto/src/App.css +184 -0
  60. package/templates/proto/src/App.tsx +15 -0
  61. package/templates/proto/src/assets/hero.png +0 -0
  62. package/templates/proto/src/assets/react.svg +1 -0
  63. package/templates/proto/src/assets/vite.svg +1 -0
  64. package/templates/proto/src/components/ui/SampleButton/sampleButton.css +4 -0
  65. package/templates/proto/src/components/ui/SampleButton/sampleButton.tsx +14 -0
  66. package/templates/proto/src/data/mock/products.csv +4 -0
  67. package/templates/proto/src/data/mock/users.json +16 -0
  68. package/templates/proto/src/data/types.ts +17 -0
  69. package/templates/proto/src/index.css +64 -0
  70. package/templates/proto/src/main.tsx +13 -0
  71. package/templates/proto/src/pages/Demo/components/DemoHeader/demoHeader.tsx +20 -0
  72. package/templates/proto/src/pages/Demo/components/FeatureGrid/featureGrid.tsx +18 -0
  73. package/templates/proto/src/pages/Demo/index.tsx +29 -0
  74. package/templates/proto/src/pages/Home/components/FeatureCard/featureCard.tsx +15 -0
  75. package/templates/proto/src/pages/Home/components/HeroSection/heroSection.tsx +28 -0
  76. package/templates/proto/src/pages/Home/components/InteractiveControls/interactiveControls.tsx +27 -0
  77. package/templates/proto/src/pages/Home/index.tsx +39 -0
  78. package/templates/proto/src/utils/format.ts +7 -0
  79. package/templates/proto/tailwind.config.js +11 -0
  80. package/templates/proto/tsconfig.app.json +28 -0
  81. package/templates/proto/tsconfig.json +7 -0
  82. package/templates/proto/tsconfig.node.json +26 -0
  83. package/templates/proto/vite.config.ts +10 -0
@@ -0,0 +1,659 @@
1
+ ---
2
+ name: ui-ux-pro-max
3
+ description: "UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, and check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, and mobile app. Elements: button, modal, navbar, sidebar, card, table, form, and chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, and flat design. Topics: color systems, accessibility, animation, layout, typography, font pairing, spacing, interaction states, shadow, and gradient. Integrations: shadcn/ui MCP for component search and examples."
4
+ ---
5
+
6
+ # UI/UX Pro Max - Design Intelligence
7
+
8
+ Comprehensive design guide for web and mobile applications. Contains 50+ styles, 161 color palettes, 57 font pairings, 161 product types with reasoning rules, 99 UX guidelines, and 25 chart types across 10 technology stacks. Searchable database with priority-based recommendations.
9
+
10
+ ## When to Apply
11
+
12
+ This Skill should be used when the task involves **UI structure, visual design decisions, interaction patterns, or user experience quality control**.
13
+
14
+ ### Must Use
15
+
16
+ This Skill must be invoked in the following situations:
17
+
18
+ - Designing new pages (Landing Page, Dashboard, Admin, SaaS, Mobile App)
19
+ - Creating or refactoring UI components (buttons, modals, forms, tables, charts, etc.)
20
+ - Choosing color schemes, typography systems, spacing standards, or layout systems
21
+ - Reviewing UI code for user experience, accessibility, or visual consistency
22
+ - Implementing navigation structures, animations, or responsive behavior
23
+ - Making product-level design decisions (style, information hierarchy, brand expression)
24
+ - Improving perceived quality, clarity, or usability of interfaces
25
+
26
+ ### Recommended
27
+
28
+ This Skill is recommended in the following situations:
29
+
30
+ - UI looks "not professional enough" but the reason is unclear
31
+ - Receiving feedback on usability or experience
32
+ - Pre-launch UI quality optimization
33
+ - Aligning cross-platform design (Web / iOS / Android)
34
+ - Building design systems or reusable component libraries
35
+
36
+ ### Skip
37
+
38
+ This Skill is not needed in the following situations:
39
+
40
+ - Pure backend logic development
41
+ - Only involving API or database design
42
+ - Performance optimization unrelated to the interface
43
+ - Infrastructure or DevOps work
44
+ - Non-visual scripts or automation tasks
45
+
46
+ **Decision criteria**: If the task will change how a feature **looks, feels, moves, or is interacted with**, this Skill should be used.
47
+
48
+ ## Rule Categories by Priority
49
+
50
+ *For human/AI reference: follow priority 1→10 to decide which rule category to focus on first; use `--domain <Domain>` to query details when needed. Scripts do not read this table.*
51
+
52
+ | Priority | Category | Impact | Domain | Key Checks (Must Have) | Anti-Patterns (Avoid) |
53
+ |----------|----------|--------|--------|------------------------|------------------------|
54
+ | 1 | Accessibility | CRITICAL | `ux` | Contrast 4.5:1, Alt text, Keyboard nav, Aria-labels | Removing focus rings, Icon-only buttons without labels |
55
+ | 2 | Touch & Interaction | CRITICAL | `ux` | Min size 44×44px, 8px+ spacing, Loading feedback | Reliance on hover only, Instant state changes (0ms) |
56
+ | 3 | Performance | HIGH | `ux` | WebP/AVIF, Lazy loading, Reserve space (CLS &lt; 0.1) | Layout thrashing, Cumulative Layout Shift |
57
+ | 4 | Style Selection | HIGH | `style`, `product` | Match product type, Consistency, SVG icons (no emoji) | Mixing flat & skeuomorphic randomly, Emoji as icons |
58
+ | 5 | Layout & Responsive | HIGH | `ux` | Mobile-first breakpoints, Viewport meta, No horizontal scroll | Horizontal scroll, Fixed px container widths, Disable zoom |
59
+ | 6 | Typography & Color | MEDIUM | `typography`, `color` | Base 16px, Line-height 1.5, Semantic color tokens | Text &lt; 12px body, Gray-on-gray, Raw hex in components |
60
+ | 7 | Animation | MEDIUM | `ux` | Duration 150–300ms, Motion conveys meaning, Spatial continuity | Decorative-only animation, Animating width/height, No reduced-motion |
61
+ | 8 | Forms & Feedback | MEDIUM | `ux` | Visible labels, Error near field, Helper text, Progressive disclosure | Placeholder-only label, Errors only at top, Overwhelm upfront |
62
+ | 9 | Navigation Patterns | HIGH | `ux` | Predictable back, Bottom nav ≤5, Deep linking | Overloaded nav, Broken back behavior, No deep links |
63
+ | 10 | Charts & Data | LOW | `chart` | Legends, Tooltips, Accessible colors | Relying on color alone to convey meaning |
64
+
65
+ ## Quick Reference
66
+
67
+ ### 1. Accessibility (CRITICAL)
68
+
69
+ - `color-contrast` - Minimum 4.5:1 ratio for normal text (large text 3:1); Material Design
70
+ - `focus-states` - Visible focus rings on interactive elements (2–4px; Apple HIG, MD)
71
+ - `alt-text` - Descriptive alt text for meaningful images
72
+ - `aria-labels` - aria-label for icon-only buttons; accessibilityLabel in native (Apple HIG)
73
+ - `keyboard-nav` - Tab order matches visual order; full keyboard support (Apple HIG)
74
+ - `form-labels` - Use label with for attribute
75
+ - `skip-links` - Skip to main content for keyboard users
76
+ - `heading-hierarchy` - Sequential h1→h6, no level skip
77
+ - `color-not-only` - Don't convey info by color alone (add icon/text)
78
+ - `dynamic-type` - Support system text scaling; avoid truncation as text grows (Apple Dynamic Type, MD)
79
+ - `reduced-motion` - Respect prefers-reduced-motion; reduce/disable animations when requested (Apple Reduced Motion API, MD)
80
+ - `voiceover-sr` - Meaningful accessibilityLabel/accessibilityHint; logical reading order for VoiceOver/screen readers (Apple HIG, MD)
81
+ - `escape-routes` - Provide cancel/back in modals and multi-step flows (Apple HIG)
82
+ - `keyboard-shortcuts` - Preserve system and a11y shortcuts; offer keyboard alternatives for drag-and-drop (Apple HIG)
83
+
84
+ ### 2. Touch & Interaction (CRITICAL)
85
+
86
+ - `touch-target-size` - Min 44×44pt (Apple) / 48×48dp (Material); extend hit area beyond visual bounds if needed
87
+ - `touch-spacing` - Minimum 8px/8dp gap between touch targets (Apple HIG, MD)
88
+ - `hover-vs-tap` - Use click/tap for primary interactions; don't rely on hover alone
89
+ - `loading-buttons` - Disable button during async operations; show spinner or progress
90
+ - `error-feedback` - Clear error messages near problem
91
+ - `cursor-pointer` - Add cursor-pointer to clickable elements (Web)
92
+ - `gesture-conflicts` - Avoid horizontal swipe on main content; prefer vertical scroll
93
+ - `tap-delay` - Use touch-action: manipulation to reduce 300ms delay (Web)
94
+ - `standard-gestures` - Use platform standard gestures consistently; don't redefine (e.g. swipe-back, pinch-zoom) (Apple HIG)
95
+ - `system-gestures` - Don't block system gestures (Control Center, back swipe, etc.) (Apple HIG)
96
+ - `press-feedback` - Visual feedback on press (ripple/highlight; MD state layers)
97
+ - `haptic-feedback` - Use haptic for confirmations and important actions; avoid overuse (Apple HIG)
98
+ - `gesture-alternative` - Don't rely on gesture-only interactions; always provide visible controls for critical actions
99
+ - `safe-area-awareness` - Keep primary touch targets away from notch, Dynamic Island, gesture bar and screen edges
100
+ - `no-precision-required` - Avoid requiring pixel-perfect taps on small icons or thin edges
101
+ - `swipe-clarity` - Swipe actions must show clear affordance or hint (chevron, label, tutorial)
102
+ - `drag-threshold` - Use a movement threshold before starting drag to avoid accidental drags
103
+
104
+ ### 3. Performance (HIGH)
105
+
106
+ - `image-optimization` - Use WebP/AVIF, responsive images (srcset/sizes), lazy load non-critical assets
107
+ - `image-dimension` - Declare width/height or use aspect-ratio to prevent layout shift (Core Web Vitals: CLS)
108
+ - `font-loading` - Use font-display: swap/optional to avoid invisible text (FOIT); reserve space to reduce layout shift (MD)
109
+ - `font-preload` - Preload only critical fonts; avoid overusing preload on every variant
110
+ - `critical-css` - Prioritize above-the-fold CSS (inline critical CSS or early-loaded stylesheet)
111
+ - `lazy-loading` - Lazy load non-hero components via dynamic import / route-level splitting
112
+ - `bundle-splitting` - Split code by route/feature (React Suspense / Next.js dynamic) to reduce initial load and TTI
113
+ - `third-party-scripts` - Load third-party scripts async/defer; audit and remove unnecessary ones (MD)
114
+ - `reduce-reflows` - Avoid frequent layout reads/writes; batch DOM reads then writes
115
+ - `content-jumping` - Reserve space for async content to avoid layout jumps (Core Web Vitals: CLS)
116
+ - `lazy-load-below-fold` - Use loading="lazy" for below-the-fold images and heavy media
117
+ - `virtualize-lists` - Virtualize lists with 50+ items to improve memory efficiency and scroll performance
118
+ - `main-thread-budget` - Keep per-frame work under ~16ms for 60fps; move heavy tasks off main thread (HIG, MD)
119
+ - `progressive-loading` - Use skeleton screens / shimmer instead of long blocking spinners for >1s operations (Apple HIG)
120
+ - `input-latency` - Keep input latency under ~100ms for taps/scrolls (Material responsiveness standard)
121
+ - `tap-feedback-speed` - Provide visual feedback within 100ms of tap (Apple HIG)
122
+ - `debounce-throttle` - Use debounce/throttle for high-frequency events (scroll, resize, input)
123
+ - `offline-support` - Provide offline state messaging and basic fallback (PWA / mobile)
124
+ - `network-fallback` - Offer degraded modes for slow networks (lower-res images, fewer animations)
125
+
126
+ ### 4. Style Selection (HIGH)
127
+
128
+ - `style-match` - Match style to product type (use `--design-system` for recommendations)
129
+ - `consistency` - Use same style across all pages
130
+ - `no-emoji-icons` - Use SVG icons (Heroicons, Lucide), not emojis
131
+ - `color-palette-from-product` - Choose palette from product/industry (search `--domain color`)
132
+ - `effects-match-style` - Shadows, blur, radius aligned with chosen style (glass / flat / clay etc.)
133
+ - `platform-adaptive` - Respect platform idioms (iOS HIG vs Material): navigation, controls, typography, motion
134
+ - `state-clarity` - Make hover/pressed/disabled states visually distinct while staying on-style (Material state layers)
135
+ - `elevation-consistent` - Use a consistent elevation/shadow scale for cards, sheets, modals; avoid random shadow values
136
+ - `dark-mode-pairing` - Design light/dark variants together to keep brand, contrast, and style consistent
137
+ - `icon-style-consistent` - Use one icon set/visual language (stroke width, corner radius) across the product
138
+ - `system-controls` - Prefer native/system controls over fully custom ones; only customize when branding requires it (Apple HIG)
139
+ - `blur-purpose` - Use blur to indicate background dismissal (modals, sheets), not as decoration (Apple HIG)
140
+ - `primary-action` - Each screen should have only one primary CTA; secondary actions visually subordinate (Apple HIG)
141
+
142
+ ### 5. Layout & Responsive (HIGH)
143
+
144
+ - `viewport-meta` - width=device-width initial-scale=1 (never disable zoom)
145
+ - `mobile-first` - Design mobile-first, then scale up to tablet and desktop
146
+ - `breakpoint-consistency` - Use systematic breakpoints (e.g. 375 / 768 / 1024 / 1440)
147
+ - `readable-font-size` - Minimum 16px body text on mobile (avoids iOS auto-zoom)
148
+ - `line-length-control` - Mobile 35–60 chars per line; desktop 60–75 chars
149
+ - `horizontal-scroll` - No horizontal scroll on mobile; ensure content fits viewport width
150
+ - `spacing-scale` - Use 4pt/8dp incremental spacing system (Material Design)
151
+ - `touch-density` - Keep component spacing comfortable for touch: not cramped, not causing mis-taps
152
+ - `container-width` - Consistent max-width on desktop (max-w-6xl / 7xl)
153
+ - `z-index-management` - Define layered z-index scale (e.g. 0 / 10 / 20 / 40 / 100 / 1000)
154
+ - `fixed-element-offset` - Fixed navbar/bottom bar must reserve safe padding for underlying content
155
+ - `scroll-behavior` - Avoid nested scroll regions that interfere with the main scroll experience
156
+ - `viewport-units` - Prefer min-h-dvh over 100vh on mobile
157
+ - `orientation-support` - Keep layout readable and operable in landscape mode
158
+ - `content-priority` - Show core content first on mobile; fold or hide secondary content
159
+ - `visual-hierarchy` - Establish hierarchy via size, spacing, contrast — not color alone
160
+
161
+ ### 6. Typography & Color (MEDIUM)
162
+
163
+ - `line-height` - Use 1.5-1.75 for body text
164
+ - `line-length` - Limit to 65-75 characters per line
165
+ - `font-pairing` - Match heading/body font personalities
166
+ - `font-scale` - Consistent type scale (e.g. 12 14 16 18 24 32)
167
+ - `contrast-readability` - Darker text on light backgrounds (e.g. slate-900 on white)
168
+ - `text-styles-system` - Use platform type system: iOS 11 Dynamic Type styles / Material 5 type roles (display, headline, title, body, label) (HIG, MD)
169
+ - `weight-hierarchy` - Use font-weight to reinforce hierarchy: Bold headings (600–700), Regular body (400), Medium labels (500) (MD)
170
+ - `color-semantic` - Define semantic color tokens (primary, secondary, error, surface, on-surface) not raw hex in components (Material color system)
171
+ - `color-dark-mode` - Dark mode uses desaturated / lighter tonal variants, not inverted colors; test contrast separately (HIG, MD)
172
+ - `color-accessible-pairs` - Foreground/background pairs must meet 4.5:1 (AA) or 7:1 (AAA); use tools to verify (WCAG, MD)
173
+ - `color-not-decorative-only` - Functional color (error red, success green) must include icon/text; avoid color-only meaning (HIG, MD)
174
+ - `truncation-strategy` - Prefer wrapping over truncation; when truncating use ellipsis and provide full text via tooltip/expand (Apple HIG)
175
+ - `letter-spacing` - Respect default letter-spacing per platform; avoid tight tracking on body text (HIG, MD)
176
+ - `number-tabular` - Use tabular/monospaced figures for data columns, prices, and timers to prevent layout shift
177
+ - `whitespace-balance` - Use whitespace intentionally to group related items and separate sections; avoid visual clutter (Apple HIG)
178
+
179
+ ### 7. Animation (MEDIUM)
180
+
181
+ - `duration-timing` - Use 150–300ms for micro-interactions; complex transitions ≤400ms; avoid >500ms (MD)
182
+ - `transform-performance` - Use transform/opacity only; avoid animating width/height/top/left
183
+ - `loading-states` - Show skeleton or progress indicator when loading exceeds 300ms
184
+ - `excessive-motion` - Animate 1-2 key elements per view max
185
+ - `easing` - Use ease-out for entering, ease-in for exiting; avoid linear for UI transitions
186
+ - `motion-meaning` - Every animation must express a cause-effect relationship, not just be decorative (Apple HIG)
187
+ - `state-transition` - State changes (hover / active / expanded / collapsed / modal) should animate smoothly, not snap
188
+ - `continuity` - Page/screen transitions should maintain spatial continuity (shared element, directional slide) (Apple HIG)
189
+ - `parallax-subtle` - Use parallax sparingly; must respect reduced-motion and not cause disorientation (Apple HIG)
190
+ - `spring-physics` - Prefer spring/physics-based curves over linear or cubic-bezier for natural feel (Apple HIG fluid animations)
191
+ - `exit-faster-than-enter` - Exit animations shorter than enter (~60–70% of enter duration) to feel responsive (MD motion)
192
+ - `stagger-sequence` - Stagger list/grid item entrance by 30–50ms per item; avoid all-at-once or too-slow reveals (MD)
193
+ - `shared-element-transition` - Use shared element / hero transitions for visual continuity between screens (MD, HIG)
194
+ - `interruptible` - Animations must be interruptible; user tap/gesture cancels in-progress animation immediately (Apple HIG)
195
+ - `no-blocking-animation` - Never block user input during an animation; UI must stay interactive (Apple HIG)
196
+ - `fade-crossfade` - Use crossfade for content replacement within the same container (MD)
197
+ - `scale-feedback` - Subtle scale (0.95–1.05) on press for tappable cards/buttons; restore on release (HIG, MD)
198
+ - `gesture-feedback` - Drag, swipe, and pinch must provide real-time visual response tracking the finger (MD Motion)
199
+ - `hierarchy-motion` - Use translate/scale direction to express hierarchy: enter from below = deeper, exit upward = back (MD)
200
+ - `motion-consistency` - Unify duration/easing tokens globally; all animations share the same rhythm and feel
201
+ - `opacity-threshold` - Fading elements should not linger below opacity 0.2; either fade fully or remain visible
202
+ - `modal-motion` - Modals/sheets should animate from their trigger source (scale+fade or slide-in) for spatial context (HIG, MD)
203
+ - `navigation-direction` - Forward navigation animates left/up; backward animates right/down — keep direction logically consistent (HIG)
204
+ - `layout-shift-avoid` - Animations must not cause layout reflow or CLS; use transform for position changes
205
+
206
+ ### 8. Forms & Feedback (MEDIUM)
207
+
208
+ - `input-labels` - Visible label per input (not placeholder-only)
209
+ - `error-placement` - Show error below the related field
210
+ - `submit-feedback` - Loading then success/error state on submit
211
+ - `required-indicators` - Mark required fields (e.g. asterisk)
212
+ - `empty-states` - Helpful message and action when no content
213
+ - `toast-dismiss` - Auto-dismiss toasts in 3-5s
214
+ - `confirmation-dialogs` - Confirm before destructive actions
215
+ - `input-helper-text` - Provide persistent helper text below complex inputs, not just placeholder (Material Design)
216
+ - `disabled-states` - Disabled elements use reduced opacity (0.38–0.5) + cursor change + semantic attribute (MD)
217
+ - `progressive-disclosure` - Reveal complex options progressively; don't overwhelm users upfront (Apple HIG)
218
+ - `inline-validation` - Validate on blur (not keystroke); show error only after user finishes input (MD)
219
+ - `input-type-keyboard` - Use semantic input types (email, tel, number) to trigger the correct mobile keyboard (HIG, MD)
220
+ - `password-toggle` - Provide show/hide toggle for password fields (MD)
221
+ - `autofill-support` - Use autocomplete / textContentType attributes so the system can autofill (HIG, MD)
222
+ - `undo-support` - Allow undo for destructive or bulk actions (e.g. "Undo delete" toast) (Apple HIG)
223
+ - `success-feedback` - Confirm completed actions with brief visual feedback (checkmark, toast, color flash) (MD)
224
+ - `error-recovery` - Error messages must include a clear recovery path (retry, edit, help link) (HIG, MD)
225
+ - `multi-step-progress` - Multi-step flows show step indicator or progress bar; allow back navigation (MD)
226
+ - `form-autosave` - Long forms should auto-save drafts to prevent data loss on accidental dismissal (Apple HIG)
227
+ - `sheet-dismiss-confirm` - Confirm before dismissing a sheet/modal with unsaved changes (Apple HIG)
228
+ - `error-clarity` - Error messages must state cause + how to fix (not just "Invalid input") (HIG, MD)
229
+ - `field-grouping` - Group related fields logically (fieldset/legend or visual grouping) (MD)
230
+ - `read-only-distinction` - Read-only state should be visually and semantically different from disabled (MD)
231
+ - `focus-management` - After submit error, auto-focus the first invalid field (WCAG, MD)
232
+ - `error-summary` - For multiple errors, show summary at top with anchor links to each field (WCAG)
233
+ - `touch-friendly-input` - Mobile input height ≥44px to meet touch target requirements (Apple HIG)
234
+ - `destructive-emphasis` - Destructive actions use semantic danger color (red) and are visually separated from primary actions (HIG, MD)
235
+ - `toast-accessibility` - Toasts must not steal focus; use aria-live="polite" for screen reader announcement (WCAG)
236
+ - `aria-live-errors` - Form errors use aria-live region or role="alert" to notify screen readers (WCAG)
237
+ - `contrast-feedback` - Error and success state colors must meet 4.5:1 contrast ratio (WCAG, MD)
238
+ - `timeout-feedback` - Request timeout must show clear feedback with retry option (MD)
239
+
240
+ ### 9. Navigation Patterns (HIGH)
241
+
242
+ - `bottom-nav-limit` - Bottom navigation max 5 items; use labels with icons (Material Design)
243
+ - `drawer-usage` - Use drawer/sidebar for secondary navigation, not primary actions (Material Design)
244
+ - `back-behavior` - Back navigation must be predictable and consistent; preserve scroll/state (Apple HIG, MD)
245
+ - `deep-linking` - All key screens must be reachable via deep link / URL for sharing and notifications (Apple HIG, MD)
246
+ - `tab-bar-ios` - iOS: use bottom Tab Bar for top-level navigation (Apple HIG)
247
+ - `top-app-bar-android` - Android: use Top App Bar with navigation icon for primary structure (Material Design)
248
+ - `nav-label-icon` - Navigation items must have both icon and text label; icon-only nav harms discoverability (MD)
249
+ - `nav-state-active` - Current location must be visually highlighted (color, weight, indicator) in navigation (HIG, MD)
250
+ - `nav-hierarchy` - Primary nav (tabs/bottom bar) vs secondary nav (drawer/settings) must be clearly separated (MD)
251
+ - `modal-escape` - Modals and sheets must offer a clear close/dismiss affordance; swipe-down to dismiss on mobile (Apple HIG)
252
+ - `search-accessible` - Search must be easily reachable (top bar or tab); provide recent/suggested queries (MD)
253
+ - `breadcrumb-web` - Web: use breadcrumbs for 3+ level deep hierarchies to aid orientation (MD)
254
+ - `state-preservation` - Navigating back must restore previous scroll position, filter state, and input (HIG, MD)
255
+ - `gesture-nav-support` - Support system gesture navigation (iOS swipe-back, Android predictive back) without conflict (HIG, MD)
256
+ - `tab-badge` - Use badges on nav items sparingly to indicate unread/pending; clear after user visits (HIG, MD)
257
+ - `overflow-menu` - When actions exceed available space, use overflow/more menu instead of cramming (MD)
258
+ - `bottom-nav-top-level` - Bottom nav is for top-level screens only; never nest sub-navigation inside it (MD)
259
+ - `adaptive-navigation` - Large screens (≥1024px) prefer sidebar; small screens use bottom/top nav (Material Adaptive)
260
+ - `back-stack-integrity` - Never silently reset the navigation stack or unexpectedly jump to home (HIG, MD)
261
+ - `navigation-consistency` - Navigation placement must stay the same across all pages; don't change by page type
262
+ - `avoid-mixed-patterns` - Don't mix Tab + Sidebar + Bottom Nav at the same hierarchy level
263
+ - `modal-vs-navigation` - Modals must not be used for primary navigation flows; they break the user's path (HIG)
264
+ - `focus-on-route-change` - After page transition, move focus to main content region for screen reader users (WCAG)
265
+ - `persistent-nav` - Core navigation must remain reachable from deep pages; don't hide it entirely in sub-flows (HIG, MD)
266
+ - `destructive-nav-separation` - Dangerous actions (delete account, logout) must be visually and spatially separated from normal nav items (HIG, MD)
267
+ - `empty-nav-state` - When a nav destination is unavailable, explain why instead of silently hiding it (MD)
268
+
269
+ ### 10. Charts & Data (LOW)
270
+
271
+ - `chart-type` - Match chart type to data type (trend → line, comparison → bar, proportion → pie/donut)
272
+ - `color-guidance` - Use accessible color palettes; avoid red/green only pairs for colorblind users (WCAG, MD)
273
+ - `data-table` - Provide table alternative for accessibility; charts alone are not screen-reader friendly (WCAG)
274
+ - `pattern-texture` - Supplement color with patterns, textures, or shapes so data is distinguishable without color (WCAG, MD)
275
+ - `legend-visible` - Always show legend; position near the chart, not detached below a scroll fold (MD)
276
+ - `tooltip-on-interact` - Provide tooltips/data labels on hover (Web) or tap (mobile) showing exact values (HIG, MD)
277
+ - `axis-labels` - Label axes with units and readable scale; avoid truncated or rotated labels on mobile
278
+ - `responsive-chart` - Charts must reflow or simplify on small screens (e.g. horizontal bar instead of vertical, fewer ticks)
279
+ - `empty-data-state` - Show meaningful empty state when no data exists ("No data yet" + guidance), not a blank chart (MD)
280
+ - `loading-chart` - Use skeleton or shimmer placeholder while chart data loads; don't show an empty axis frame
281
+ - `animation-optional` - Chart entrance animations must respect prefers-reduced-motion; data should be readable immediately (HIG)
282
+ - `large-dataset` - For 1000+ data points, aggregate or sample; provide drill-down for detail instead of rendering all (MD)
283
+ - `number-formatting` - Use locale-aware formatting for numbers, dates, currencies on axes and labels (HIG, MD)
284
+ - `touch-target-chart` - Interactive chart elements (points, segments) must have ≥44pt tap area or expand on touch (Apple HIG)
285
+ - `no-pie-overuse` - Avoid pie/donut for >5 categories; switch to bar chart for clarity
286
+ - `contrast-data` - Data lines/bars vs background ≥3:1; data text labels ≥4.5:1 (WCAG)
287
+ - `legend-interactive` - Legends should be clickable to toggle series visibility (MD)
288
+ - `direct-labeling` - For small datasets, label values directly on the chart to reduce eye travel
289
+ - `tooltip-keyboard` - Tooltip content must be keyboard-reachable and not rely on hover alone (WCAG)
290
+ - `sortable-table` - Data tables must support sorting with aria-sort indicating current sort state (WCAG)
291
+ - `axis-readability` - Axis ticks must not be cramped; maintain readable spacing, auto-skip on small screens
292
+ - `data-density` - Limit information density per chart to avoid cognitive overload; split into multiple charts if needed
293
+ - `trend-emphasis` - Emphasize data trends over decoration; avoid heavy gradients/shadows that obscure the data
294
+ - `gridline-subtle` - Grid lines should be low-contrast (e.g. gray-200) so they don't compete with data
295
+ - `focusable-elements` - Interactive chart elements (points, bars, slices) must be keyboard-navigable (WCAG)
296
+ - `screen-reader-summary` - Provide a text summary or aria-label describing the chart's key insight for screen readers (WCAG)
297
+ - `error-state-chart` - Data load failure must show error message with retry action, not a broken/empty chart
298
+ - `export-option` - For data-heavy products, offer CSV/image export of chart data
299
+ - `drill-down-consistency` - Drill-down interactions must maintain a clear back-path and hierarchy breadcrumb
300
+ - `time-scale-clarity` - Time series charts must clearly label time granularity (day/week/month) and allow switching
301
+
302
+ ## How to Use
303
+
304
+ Search specific domains using the CLI tool below.
305
+
306
+ ---
307
+
308
+ ## Prerequisites
309
+
310
+ Check if Python is installed:
311
+
312
+ ```bash
313
+ python3 --version || python --version
314
+ ```
315
+
316
+ If Python is not installed, install it based on user's OS:
317
+
318
+ **macOS:**
319
+ ```bash
320
+ brew install python3
321
+ ```
322
+
323
+ **Ubuntu/Debian:**
324
+ ```bash
325
+ sudo apt update && sudo apt install python3
326
+ ```
327
+
328
+ **Windows:**
329
+ ```powershell
330
+ winget install Python.Python.3.12
331
+ ```
332
+
333
+ ---
334
+
335
+ ## How to Use This Skill
336
+
337
+ Use this skill when the user requests any of the following:
338
+
339
+ | Scenario | Trigger Examples | Start From |
340
+ |----------|-----------------|------------|
341
+ | **New project / page** | "Build a landing page", "Build a dashboard" | Step 1 → Step 2 (design system) |
342
+ | **New component** | "Create a pricing card", "Add a modal" | Step 3 (domain search: style, ux) |
343
+ | **Choose style / color / font** | "What style fits a fintech app?", "Recommend a color palette" | Step 2 (design system) |
344
+ | **Review existing UI** | "Review this page for UX issues", "Check accessibility" | Quick Reference checklist above |
345
+ | **Fix a UI bug** | "Button hover is broken", "Layout shifts on load" | Quick Reference → relevant section |
346
+ | **Improve / optimize** | "Make this faster", "Improve mobile experience" | Step 3 (domain search: ux, react) |
347
+ | **Implement dark mode** | "Add dark mode support" | Step 3 (domain: style "dark mode") |
348
+ | **Add charts / data viz** | "Add an analytics dashboard chart" | Step 3 (domain: chart) |
349
+ | **Stack best practices** | "React performance tips"、"SwiftUI navigation" | Step 4 (stack search) |
350
+
351
+ Follow this workflow:
352
+
353
+ ### Step 1: Analyze User Requirements
354
+
355
+ Extract key information from user request:
356
+ - **Product type**: Entertainment (social, video, music, gaming), Tool (scanner, editor, converter), Productivity (task manager, notes, calendar), or hybrid
357
+ - **Target audience**: C-end consumer users; consider age group, usage context (commute, leisure, work)
358
+ - **Style keywords**: playful, vibrant, minimal, dark mode, content-first, immersive, etc.
359
+ - **Stack**: React Native (this project's only tech stack)
360
+
361
+ ### Step 2: Generate Design System (REQUIRED)
362
+
363
+ **Always start with `--design-system`** to get comprehensive recommendations with reasoning:
364
+
365
+ ```bash
366
+ python3 skills/ui-ux-pro-max/scripts/search.py "<product_type> <industry> <keywords>" --design-system [-p "Project Name"]
367
+ ```
368
+
369
+ This command:
370
+ 1. Searches domains in parallel (product, style, color, landing, typography)
371
+ 2. Applies reasoning rules from `ui-reasoning.csv` to select best matches
372
+ 3. Returns complete design system: pattern, style, colors, typography, effects
373
+ 4. Includes anti-patterns to avoid
374
+
375
+ **Example:**
376
+ ```bash
377
+ python3 skills/ui-ux-pro-max/scripts/search.py "beauty spa wellness service" --design-system -p "Serenity Spa"
378
+ ```
379
+
380
+ ### Step 2b: Persist Design System (Master + Overrides Pattern)
381
+
382
+ To save the design system for **hierarchical retrieval across sessions**, add `--persist`:
383
+
384
+ ```bash
385
+ python3 skills/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Project Name"
386
+ ```
387
+
388
+ This creates:
389
+ - `design-system/MASTER.md` — Global Source of Truth with all design rules
390
+ - `design-system/pages/` — Folder for page-specific overrides
391
+
392
+ **With page-specific override:**
393
+ ```bash
394
+ python3 skills/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Project Name" --page "dashboard"
395
+ ```
396
+
397
+ This also creates:
398
+ - `design-system/pages/dashboard.md` — Page-specific deviations from Master
399
+
400
+ **How hierarchical retrieval works:**
401
+ 1. When building a specific page (e.g., "Checkout"), first check `design-system/pages/checkout.md`
402
+ 2. If the page file exists, its rules **override** the Master file
403
+ 3. If not, use `design-system/MASTER.md` exclusively
404
+
405
+ **Context-aware retrieval prompt:**
406
+ ```
407
+ I am building the [Page Name] page. Please read design-system/MASTER.md.
408
+ Also check if design-system/pages/[page-name].md exists.
409
+ If the page file exists, prioritize its rules.
410
+ If not, use the Master rules exclusively.
411
+ Now, generate the code...
412
+ ```
413
+
414
+ ### Step 3: Supplement with Detailed Searches (as needed)
415
+
416
+ After getting the design system, use domain searches to get additional details:
417
+
418
+ ```bash
419
+ python3 skills/ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
420
+ ```
421
+
422
+ **When to use detailed searches:**
423
+
424
+ | Need | Domain | Example |
425
+ |------|--------|---------|
426
+ | Product type patterns | `product` | `--domain product "entertainment social"` |
427
+ | More style options | `style` | `--domain style "glassmorphism dark"` |
428
+ | Color palettes | `color` | `--domain color "entertainment vibrant"` |
429
+ | Font pairings | `typography` | `--domain typography "playful modern"` |
430
+ | Chart recommendations | `chart` | `--domain chart "real-time dashboard"` |
431
+ | UX best practices | `ux` | `--domain ux "animation accessibility"` |
432
+ | Alternative fonts | `typography` | `--domain typography "elegant luxury"` |
433
+ | Individual Google Fonts | `google-fonts` | `--domain google-fonts "sans serif popular variable"` |
434
+ | Landing structure | `landing` | `--domain landing "hero social-proof"` |
435
+ | React Native perf | `react` | `--domain react "rerender memo list"` |
436
+ | App interface a11y | `web` | `--domain web "accessibilityLabel touch safe-areas"` |
437
+ | AI prompt / CSS keywords | `prompt` | `--domain prompt "minimalism"` |
438
+
439
+ ### Step 4: Stack Guidelines (React Native)
440
+
441
+ Get React Native implementation-specific best practices:
442
+
443
+ ```bash
444
+ python3 skills/ui-ux-pro-max/scripts/search.py "<keyword>" --stack react-native
445
+ ```
446
+
447
+ ---
448
+
449
+ ## Search Reference
450
+
451
+ ### Available Domains
452
+
453
+ | Domain | Use For | Example Keywords |
454
+ |--------|---------|------------------|
455
+ | `product` | Product type recommendations | SaaS, e-commerce, portfolio, healthcare, beauty, service |
456
+ | `style` | UI styles, colors, effects | glassmorphism, minimalism, dark mode, brutalism |
457
+ | `typography` | Font pairings, Google Fonts | elegant, playful, professional, modern |
458
+ | `color` | Color palettes by product type | saas, ecommerce, healthcare, beauty, fintech, service |
459
+ | `landing` | Page structure, CTA strategies | hero, hero-centric, testimonial, pricing, social-proof |
460
+ | `chart` | Chart types, library recommendations | trend, comparison, timeline, funnel, pie |
461
+ | `ux` | Best practices, anti-patterns | animation, accessibility, z-index, loading |
462
+ | `google-fonts` | Individual Google Fonts lookup | sans serif, monospace, japanese, variable font, popular |
463
+ | `react` | React/Next.js performance | waterfall, bundle, suspense, memo, rerender, cache |
464
+ | `web` | App interface guidelines (iOS/Android/React Native) | accessibilityLabel, touch targets, safe areas, Dynamic Type |
465
+ | `prompt` | AI prompts, CSS keywords | (style name) |
466
+
467
+ ### Available Stacks
468
+
469
+ | Stack | Focus |
470
+ |-------|-------|
471
+ | `react-native` | Components, Navigation, Lists |
472
+
473
+ ---
474
+
475
+ ## Example Workflow
476
+
477
+ **User request:** "Make an AI search homepage."
478
+
479
+ ### Step 1: Analyze Requirements
480
+ - Product type: Tool (AI search engine)
481
+ - Target audience: C-end users looking for fast, intelligent search
482
+ - Style keywords: modern, minimal, content-first, dark mode
483
+ - Stack: React Native
484
+
485
+ ### Step 2: Generate Design System (REQUIRED)
486
+
487
+ ```bash
488
+ python3 skills/ui-ux-pro-max/scripts/search.py "AI search tool modern minimal" --design-system -p "AI Search"
489
+ ```
490
+
491
+ **Output:** Complete design system with pattern, style, colors, typography, effects, and anti-patterns.
492
+
493
+ ### Step 3: Supplement with Detailed Searches (as needed)
494
+
495
+ ```bash
496
+ # Get style options for a modern tool product
497
+ python3 skills/ui-ux-pro-max/scripts/search.py "minimalism dark mode" --domain style
498
+
499
+ # Get UX best practices for search interaction and loading
500
+ python3 skills/ui-ux-pro-max/scripts/search.py "search loading animation" --domain ux
501
+ ```
502
+
503
+ ### Step 4: Stack Guidelines
504
+
505
+ ```bash
506
+ python3 skills/ui-ux-pro-max/scripts/search.py "list performance navigation" --stack react-native
507
+ ```
508
+
509
+ **Then:** Synthesize design system + detailed searches and implement the design.
510
+
511
+ ---
512
+
513
+ ## Output Formats
514
+
515
+ The `--design-system` flag supports two output formats:
516
+
517
+ ```bash
518
+ # ASCII box (default) - best for terminal display
519
+ python3 skills/ui-ux-pro-max/scripts/search.py "fintech crypto" --design-system
520
+
521
+ # Markdown - best for documentation
522
+ python3 skills/ui-ux-pro-max/scripts/search.py "fintech crypto" --design-system -f markdown
523
+ ```
524
+
525
+ ---
526
+
527
+ ## Tips for Better Results
528
+
529
+ ### Query Strategy
530
+
531
+ - Use **multi-dimensional keywords** — combine product + industry + tone + density: `"entertainment social vibrant content-dense"` not just `"app"`
532
+ - Try different keywords for the same need: `"playful neon"` → `"vibrant dark"` → `"content-first minimal"`
533
+ - Use `--design-system` first for full recommendations, then `--domain` to deep-dive any dimension you're unsure about
534
+ - Always add `--stack react-native` for implementation-specific guidance
535
+
536
+ ### Common Sticking Points
537
+
538
+ | Problem | What to Do |
539
+ |---------|------------|
540
+ | Can't decide on style/color | Re-run `--design-system` with different keywords |
541
+ | Dark mode contrast issues | Quick Reference §6: `color-dark-mode` + `color-accessible-pairs` |
542
+ | Animations feel unnatural | Quick Reference §7: `spring-physics` + `easing` + `exit-faster-than-enter` |
543
+ | Form UX is poor | Quick Reference §8: `inline-validation` + `error-clarity` + `focus-management` |
544
+ | Navigation feels confusing | Quick Reference §9: `nav-hierarchy` + `bottom-nav-limit` + `back-behavior` |
545
+ | Layout breaks on small screens | Quick Reference §5: `mobile-first` + `breakpoint-consistency` |
546
+ | Performance / jank | Quick Reference §3: `virtualize-lists` + `main-thread-budget` + `debounce-throttle` |
547
+
548
+ ### Pre-Delivery Checklist
549
+
550
+ - Run `--domain ux "animation accessibility z-index loading"` as a UX validation pass before implementation
551
+ - Run through Quick Reference **§1–§3** (CRITICAL + HIGH) as a final review
552
+ - Test on 375px (small phone) and landscape orientation
553
+ - Verify behavior with **reduced-motion** enabled and **Dynamic Type** at largest size
554
+ - Check dark mode contrast independently (don't assume light mode values work)
555
+ - Confirm all touch targets ≥44pt and no content hidden behind safe areas
556
+
557
+ ---
558
+
559
+ ## Common Rules for Professional UI
560
+
561
+ These are frequently overlooked issues that make UI look unprofessional:
562
+ Scope notice: The rules below are for App UI (iOS/Android/React Native/Flutter), not desktop-web interaction patterns.
563
+
564
+ ### Icons & Visual Elements
565
+
566
+ | Rule | Standard | Avoid | Why It Matters |
567
+ |------|----------|--------|----------------|
568
+ | **No Emoji as Structural Icons** | Use vector-based icons (e.g., Lucide, react-native-vector-icons, @expo/vector-icons). | Using emojis (🎨 🚀 ⚙️) for navigation, settings, or system controls. | Emojis are font-dependent, inconsistent across platforms, and cannot be controlled via design tokens. |
569
+ | **Vector-Only Assets** | Use SVG or platform vector icons that scale cleanly and support theming. | Raster PNG icons that blur or pixelate. | Ensures scalability, crisp rendering, and dark/light mode adaptability. |
570
+ | **Stable Interaction States** | Use color, opacity, or elevation transitions for press states without changing layout bounds. | Layout-shifting transforms that move surrounding content or trigger visual jitter. | Prevents unstable interactions and preserves smooth motion/perceived quality on mobile. |
571
+ | **Correct Brand Logos** | Use official brand assets and follow their usage guidelines (spacing, color, clear space). | Guessing logo paths, recoloring unofficially, or modifying proportions. | Prevents brand misuse and ensures legal/platform compliance. |
572
+ | **Consistent Icon Sizing** | Define icon sizes as design tokens (e.g., icon-sm, icon-md = 24pt, icon-lg). | Mixing arbitrary values like 20pt / 24pt / 28pt randomly. | Maintains rhythm and visual hierarchy across the interface. |
573
+ | **Stroke Consistency** | Use a consistent stroke width within the same visual layer (e.g., 1.5px or 2px). | Mixing thick and thin stroke styles arbitrarily. | Inconsistent strokes reduce perceived polish and cohesion. |
574
+ | **Filled vs Outline Discipline** | Use one icon style per hierarchy level. | Mixing filled and outline icons at the same hierarchy level. | Maintains semantic clarity and stylistic coherence. |
575
+ | **Touch Target Minimum** | Minimum 44×44pt interactive area (use hitSlop if icon is smaller). | Small icons without expanded tap area. | Meets accessibility and platform usability standards. |
576
+ | **Icon Alignment** | Align icons to text baseline and maintain consistent padding. | Misaligned icons or inconsistent spacing around them. | Prevents subtle visual imbalance that reduces perceived quality. |
577
+ | **Icon Contrast** | Follow WCAG contrast standards: 4.5:1 for small elements, 3:1 minimum for larger UI glyphs. | Low-contrast icons that blend into the background. | Ensures accessibility in both light and dark modes. |
578
+
579
+
580
+ ### Interaction (App)
581
+
582
+ | Rule | Do | Don't |
583
+ |------|----|----- |
584
+ | **Tap feedback** | Provide clear pressed feedback (ripple/opacity/elevation) within 80-150ms | No visual response on tap |
585
+ | **Animation timing** | Keep micro-interactions around 150-300ms with platform-native easing | Instant transitions or slow animations (>500ms) |
586
+ | **Accessibility focus** | Ensure screen reader focus order matches visual order and labels are descriptive | Unlabeled controls or confusing focus traversal |
587
+ | **Disabled state clarity** | Use disabled semantics (`disabled`/native disabled props), reduced emphasis, and no tap action | Controls that look tappable but do nothing |
588
+ | **Touch target minimum** | Keep tap areas >=44x44pt (iOS) or >=48x48dp (Android), expand hit area when icon is smaller | Tiny tap targets or icon-only hit areas without padding |
589
+ | **Gesture conflict prevention** | Keep one primary gesture per region and avoid nested tap/drag conflicts | Overlapping gestures causing accidental actions |
590
+ | **Semantic native controls** | Prefer native interactive primitives (`Button`, `Pressable`, platform equivalents) with proper accessibility roles | Generic containers used as primary controls without semantics |
591
+
592
+ ### Light/Dark Mode Contrast
593
+
594
+ | Rule | Do | Don't |
595
+ |------|----|----- |
596
+ | **Surface readability (light)** | Keep cards/surfaces clearly separated from background with sufficient opacity/elevation | Overly transparent surfaces that blur hierarchy |
597
+ | **Text contrast (light)** | Maintain body text contrast >=4.5:1 against light surfaces | Low-contrast gray body text |
598
+ | **Text contrast (dark)** | Maintain primary text contrast >=4.5:1 and secondary text >=3:1 on dark surfaces | Dark mode text that blends into background |
599
+ | **Border and divider visibility** | Ensure separators are visible in both themes (not just light mode) | Theme-specific borders disappearing in one mode |
600
+ | **State contrast parity** | Keep pressed/focused/disabled states equally distinguishable in light and dark themes | Defining interaction states for one theme only |
601
+ | **Token-driven theming** | Use semantic color tokens mapped per theme across app surfaces/text/icons | Hardcoded per-screen hex values |
602
+ | **Scrim and modal legibility** | Use a modal scrim strong enough to isolate foreground content (typically 40-60% black) | Weak scrim that leaves background visually competing |
603
+
604
+ ### Layout & Spacing
605
+
606
+ | Rule | Do | Don't |
607
+ |------|----|----- |
608
+ | **Safe-area compliance** | Respect top/bottom safe areas for all fixed headers, tab bars, and CTA bars | Placing fixed UI under notch, status bar, or gesture area |
609
+ | **System bar clearance** | Add spacing for status/navigation bars and gesture home indicator | Let tappable content collide with OS chrome |
610
+ | **Consistent content width** | Keep predictable content width per device class (phone/tablet) | Mixing arbitrary widths between screens |
611
+ | **8dp spacing rhythm** | Use a consistent 4/8dp spacing system for padding/gaps/section spacing | Random spacing increments with no rhythm |
612
+ | **Readable text measure** | Keep long-form text readable on large devices (avoid edge-to-edge paragraphs on tablets) | Full-width long text that hurts readability |
613
+ | **Section spacing hierarchy** | Define clear vertical rhythm tiers (e.g., 16/24/32/48) by hierarchy | Similar UI levels with inconsistent spacing |
614
+ | **Adaptive gutters by breakpoint** | Increase horizontal insets on larger widths and in landscape | Same narrow gutter on all device sizes/orientations |
615
+ | **Scroll and fixed element coexistence** | Add bottom/top content insets so lists are not hidden behind fixed bars | Scroll content obscured by sticky headers/footers |
616
+
617
+ ---
618
+
619
+ ## Pre-Delivery Checklist
620
+
621
+ Before delivering UI code, verify these items:
622
+ Scope notice: This checklist is for App UI (iOS/Android/React Native/Flutter).
623
+
624
+ ### Visual Quality
625
+ - [ ] No emojis used as icons (use SVG instead)
626
+ - [ ] All icons come from a consistent icon family and style
627
+ - [ ] Official brand assets are used with correct proportions and clear space
628
+ - [ ] Pressed-state visuals do not shift layout bounds or cause jitter
629
+ - [ ] Semantic theme tokens are used consistently (no ad-hoc per-screen hardcoded colors)
630
+
631
+ ### Interaction
632
+ - [ ] All tappable elements provide clear pressed feedback (ripple/opacity/elevation)
633
+ - [ ] Touch targets meet minimum size (>=44x44pt iOS, >=48x48dp Android)
634
+ - [ ] Micro-interaction timing stays in the 150-300ms range with native-feeling easing
635
+ - [ ] Disabled states are visually clear and non-interactive
636
+ - [ ] Screen reader focus order matches visual order, and interactive labels are descriptive
637
+ - [ ] Gesture regions avoid nested/conflicting interactions (tap/drag/back-swipe conflicts)
638
+
639
+ ### Light/Dark Mode
640
+ - [ ] Primary text contrast >=4.5:1 in both light and dark mode
641
+ - [ ] Secondary text contrast >=3:1 in both light and dark mode
642
+ - [ ] Dividers/borders and interaction states are distinguishable in both modes
643
+ - [ ] Modal/drawer scrim opacity is strong enough to preserve foreground legibility (typically 40-60% black)
644
+ - [ ] Both themes are tested before delivery (not inferred from a single theme)
645
+
646
+ ### Layout
647
+ - [ ] Safe areas are respected for headers, tab bars, and bottom CTA bars
648
+ - [ ] Scroll content is not hidden behind fixed/sticky bars
649
+ - [ ] Verified on small phone, large phone, and tablet (portrait + landscape)
650
+ - [ ] Horizontal insets/gutters adapt correctly by device size and orientation
651
+ - [ ] 4/8dp spacing rhythm is maintained across component, section, and page levels
652
+ - [ ] Long-form text measure remains readable on larger devices (no edge-to-edge paragraphs)
653
+
654
+ ### Accessibility
655
+ - [ ] All meaningful images/icons have accessibility labels
656
+ - [ ] Form fields have labels, hints, and clear error messages
657
+ - [ ] Color is not the only indicator
658
+ - [ ] Reduced motion and dynamic text size are supported without layout breakage
659
+ - [ ] Accessibility traits/roles/states (selected, disabled, expanded) are announced correctly