Stitch UED Guidelines
This skill serves as a reference for User Experience Design (UED) guidelines when working with Stitch. It includes interaction principles, visual vocabulary, and prompt engineering strategies.
When to use this skill
Use this skill when:
- The user asks about layout or style terms (e.g. Masonry, Glassmorphism, Sidebar) or device constraints (mobile vs desktop width, touch targets).
- You need to structure or improve a Stitch prompt (Context → Layout → Component → Content) or ensure consistent UED wording.
- You are coordinating with stitch-ui-designer and need UED/accessibility/design-system alignment alongside Stitch generation.
For transforming vague ideas into a full Stitch prompt, use stitch-ui-prompt-architect; combine both when you want structure + vocabulary (this skill) and concrete prompt output (prompt-architect).
Design Modes (Model Selection)
Stitch operates in two distinct modes, which you should choose based on the user's need for speed vs. fidelity:
Prompt Engineering Strategy
A perfect Stitch prompt follows this structure:
[Context & Style] + [Layout Structure] + [Component Details] + [Content & Data]
1. Context & Style
- Context: "Mobile fitness app for gym goers."
- Style: "Dark mode with neon green accents (Cyberpunk). Rounded corners."
- Reference: "Similar to Spotify's dark theme but for fitness."
2. Layout Structure
- Mobile: "Bottom navigation bar, scrollable feed."
- Desktop: "Left sidebar navigation, top header, main content area with data grid."
- Grid: "3-column card grid with responsive behavior."
3. Component Details
- Don't say: "A list."
- Do say: "A vertical list of 'Workout Cards', each containing a map thumbnail, duration (e.g., '30 min'), and a 'Start' button."
4. Content & Data
- Realism: Ask for realistic data. "User 'Alice', 'Morning Yoga', '300 kcal'."
- State: "Active state for the 'Home' tab."
Quick checklist (before calling generate_screen_from_text):
Visual Vocabulary
Use these terms to control the look and feel:
Layout Patterns
- Hero Section: Top area with main headline/image.
- Split Screen: Left/Right division (common in Desktop Auth).
- Masonry: Waterfall layout (Pinterest style).
- Sidebar Navigation: Vertical nav on the left (SaaS standard).
Style Modifiers
- Flat: No shadows, high saturation.
- Material: Shadows, layers, paper metaphor.
- Neomorphism: Soft shadows, extruded shapes.
- Glassmorphism: Blurred transparency, frosted glass.
- Brutalism: Raw, bold, high contrast, large typography.
Color & Theme Prompts
When describing Context & Style, use a clear color structure so Stitch produces consistent palettes. A strong pattern (inspired by AI配色提示词-UI配色指南):
Structure: [App type] + [Background hex] + [Primary hex] + [Secondary hex] + [Accent hex] + [Design system] + [Mood]. Optionally add semantic colors: success green, alert red, warning yellow.
Example — Dark productivity:
Modern productivity app dark theme, charcoal grey background #1a1a1a, primary blue #4A90E2, secondary teal #26D0CE, neutral greys #2d2d2d to #f5f5f5, accent orange #FF6B35 for CTAs, Material Design 3 inspired, high contrast for readability, professional and focused atmosphere.
Example — Bright desktop tool:
Project management app bright theme, clean white background #FFFFFF, primary royal blue #2563EB, secondary purple #7C3AED, soft grey cards #F9FAFB, green success #22C55E, red alerts #DC2626, yellow warnings #F59E0B, minimal design with subtle shadows, organized and efficient visual hierarchy.
Quick color checklist: Background defined? Primary/secondary/accent with hex? Semantic colors (success/alert/warning) if needed? Design system (Material 3, Fluent) or style (glassmorphism, minimal) mentioned?
More ready-to-use prompts: see docs/color-prompt-guide.md in this repo, or the original article for 20 curated prompts.
Device Guidelines
- Mobile: ~375px width. Focus on thumb-friendly bottom navigation. Vertical scrolling is expected.
- Desktop/Web: ~1440px width. Use horizontal space. Multi-column layouts.
- Tablet: Hybrid. Often resembles desktop but with touch targets.
Accessibility & Inclusive Design
- Contrast & readability: Prefer sufficient contrast (dark/light); avoid low-contrast text. In prompts, you can add "high contrast" or "clear text hierarchy."
- Touch targets: For mobile/tablet, ask for touch-friendly controls (e.g. "buttons at least 44px tap area"). In Context or Component details, add "touch-friendly" when relevant.
- Focus & keyboard: For desktop, mention "clear focus states" or "keyboard-navigable" when the design should support accessibility.
- In prompts: Add phrases like "high contrast," "clear focus states," "touch-friendly buttons" in Context/Style or Component Details when UED or accessibility alignment is needed.
Controls & Variants
- Variants: Stitch generates multiple options. You can ask to "Generate variants for the hero section" to A/B test designs.
- Controls: Use the Interactive Chat to refine designs ("Make the button blue", "Move the logo to the center").
Related resources
- Stitch Effective Prompting Guide: https://stitch.withgoogle.com/docs/learn/prompting/ — official best practices; consult for up-to-date recommendations.
- Division of labor: stitch-ued-guide = structure and vocabulary (how to phrase, what terms to use). stitch-ui-prompt-architect = transform vague ideas into a full, executable Stitch prompt (with DESIGN.md, framework contracts). Use both when you need consistent UED wording and concrete prompt output.
- Vague → enhanced prompt: Use stitch-ui-prompt-architect (Path A: enhance vague UI ideas with specificity, UI/UX keywords, DESIGN.md context). Use with stitch-design-md for DESIGN.md and stitch-ui-design-spec-generator for full flow.
- Stitch skills in this repo (prefer these over official): design-md → stitch-design-md; enhance-prompt → stitch-ui-prompt-architect (two paths + framework contracts); react-components → stitch-react-components; stitch-loop → stitch-loop; remotion → stitch-remotion; shadcn-ui → stitch-shadcn-ui. Plus stitch-mcp-* (one skill per MCP tool: create-project, get-project, list-projects, generate-screen-from-text, get-screen, list-screens), stitch-ui-design-spec-* (Bootstrap, Element Plus, Layui, uView, uView Pro, Vant), stitch-ui-designer (orchestrator), and six Stitch→framework conversion skills (Vue + Element/Bootstrap/Layui/Vant, uni-app + uView/uView Pro). These skills reference each other and the same MCP; use stitch-mcp- names (e.g. get_screen → stitch-mcp-get-screen).
References
能力边界
✅ 适用场景
- 当你需要使用此技能对应的技术栈时
- 当项目需要遵循最佳实践时
- 当需要快速上手或深入理解核心概念时
⚠️ 需要注意
- 复杂业务逻辑需要结合具体场景调整
- 性能优化需要根据实际数据量评估
❌ 不适用场景
常见陷阱 (Gotchas)
- 版本兼容性:注意框架版本与依赖库的兼容性,不同版本 API 可能有差异
- 配置文件格式:配置文件格式错误是最常见的问题,建议使用编辑器的语法检查
- 环境变量:确保所有必要的环境变量已正确设置,敏感信息不要硬编码
- 依赖冲突:多版本共存时注意依赖冲突,使用 lock 文件锁定版本
- 性能陷阱:大数据量场景下注意性能优化,避免 N+1 查询等常见问题
使用流程
Step 1: 环境准备
确保开发环境已安装必要的依赖和工具。
Step 2: 配置初始化
根据项目需求进行基础配置。
Step 3: 核心功能使用
按照示例代码实现核心功能。
Step 4: 测试验证
运行测试确保功能正常。
Step 5: 部署上线
完成开发后进行部署和监控。
1---2name: stitch-ued-guide3description: UED guidelines, visual vocabulary, and prompt structure for Stitch. Use when the user asks about layout/style terms, device constraints, or when structuring/improving Stitch prompts; combine with stitch-ui-prompt-architect for vague→concrete prompts.4---567# Stitch UED Guidelines89This skill serves as a reference for User Experience Design (UED) guidelines when working with Stitch. It includes interaction principles, visual vocabulary, and prompt engineering strategies.1011## When to use this skill1213Use this skill when:1415* The user asks about **layout or style terms** (e.g. Masonry, Glassmorphism, Sidebar) or **device constraints** (mobile vs desktop width, touch targets).16* You need to **structure or improve a Stitch prompt** (Context → Layout → Component → Content) or ensure consistent UED wording.17* You are coordinating with **stitch-ui-designer** and need UED/accessibility/design-system alignment alongside Stitch generation.1819For **transforming vague ideas into a full Stitch prompt**, use **stitch-ui-prompt-architect**; combine both when you want structure + vocabulary (this skill) and concrete prompt output (prompt-architect).2021## Design Modes (Model Selection)2223Stitch operates in two distinct modes, which you should choose based on the user's need for speed vs. fidelity:2425* **Standard Mode (Gemini 2.5 Flash)**26 * **Best for**: Rapid iteration, wireframing, exploring multiple layout ideas quickly.27 * **Features**: Fast generation, Text-to-UI, Theme editing.28 * **Use Case**: "Show me 3 different layout options for a login screen."2930* **Experimental Mode (Gemini 2.5 Pro)**31 * **Best for**: High-fidelity design, complex logic, visual references.32 * **Features**: Image-to-UI (Sketch/Screenshot upload), richer details, smarter component logic.33 * **Use Case**: "Turn this napkin sketch into a production-ready dashboard."3435## Prompt Engineering Strategy3637A perfect Stitch prompt follows this structure:38`[Context & Style]` + `[Layout Structure]` + `[Component Details]` + `[Content & Data]`3940### 1. Context & Style41* **Context**: "Mobile fitness app for gym goers."42* **Style**: "Dark mode with neon green accents (Cyberpunk). Rounded corners."43* **Reference**: "Similar to Spotify's dark theme but for fitness."4445### 2. Layout Structure46* **Mobile**: "Bottom navigation bar, scrollable feed."47* **Desktop**: "Left sidebar navigation, top header, main content area with data grid."48* **Grid**: "3-column card grid with responsive behavior."4950### 3. Component Details51* **Don't say**: "A list."52* **Do say**: "A vertical list of 'Workout Cards', each containing a map thumbnail, duration (e.g., '30 min'), and a 'Start' button."5354### 4. Content & Data55* **Realism**: Ask for realistic data. "User 'Alice', 'Morning Yoga', '300 kcal'."56* **State**: "Active state for the 'Home' tab."5758**Quick checklist (before calling generate_screen_from_text):**5960* [ ] **Context & style** defined? (device, app type, theme)61* [ ] **Layout** defined? (nav position, main area structure)62* [ ] **Key components** specific? (avoid "a list"; use e.g. "Workout Cards with map thumbnail, duration, Start button")63* [ ] **Sample content / state** included? (real copy, active state)6465## Visual Vocabulary6667Use these terms to control the look and feel:6869### Layout Patterns70* **Hero Section**: Top area with main headline/image.71* **Split Screen**: Left/Right division (common in Desktop Auth).72* **Masonry**: Waterfall layout (Pinterest style).73* **Sidebar Navigation**: Vertical nav on the left (SaaS standard).7475### Style Modifiers76* **Flat**: No shadows, high saturation.77* **Material**: Shadows, layers, paper metaphor.78* **Neomorphism**: Soft shadows, extruded shapes.79* **Glassmorphism**: Blurred transparency, frosted glass.80* **Brutalism**: Raw, bold, high contrast, large typography.8182## Color & Theme Prompts8384When describing **Context & Style**, use a clear color structure so Stitch produces consistent palettes. A strong pattern (inspired by [AI配色提示词-UI配色指南](https://mp.weixin.qq.com/s/1SDFd7ZOPkbhpvHsmTJQjQ)):8586**Structure**: `[App type]` + `[Background hex]` + `[Primary hex]` + `[Secondary hex]` + `[Accent hex]` + `[Design system]` + `[Mood]`. Optionally add **semantic colors**: success green, alert red, warning yellow.8788**Example — Dark productivity:**89> Modern productivity app dark theme, charcoal grey background #1a1a1a, primary blue #4A90E2, secondary teal #26D0CE, neutral greys #2d2d2d to #f5f5f5, accent orange #FF6B35 for CTAs, Material Design 3 inspired, high contrast for readability, professional and focused atmosphere.9091**Example — Bright desktop tool:**92> Project management app bright theme, clean white background #FFFFFF, primary royal blue #2563EB, secondary purple #7C3AED, soft grey cards #F9FAFB, green success #22C55E, red alerts #DC2626, yellow warnings #F59E0B, minimal design with subtle shadows, organized and efficient visual hierarchy.9394**Quick color checklist**: Background defined? Primary/secondary/accent with hex? Semantic colors (success/alert/warning) if needed? Design system (Material 3, Fluent) or style (glassmorphism, minimal) mentioned?9596More ready-to-use prompts: see [`docs/color-prompt-guide.md`](https://github.com/full-stack-skills/stitch-skills/blob/main/docs/color-prompt-guide.md) in this repo, or the [original article](https://mp.weixin.qq.com/s/1SDFd7ZOPkbhpvHsmTJQjQ) for 20 curated prompts.9798## Device Guidelines99100* **Mobile**: ~375px width. Focus on thumb-friendly bottom navigation. Vertical scrolling is expected.101* **Desktop/Web**: ~1440px width. Use horizontal space. Multi-column layouts.102* **Tablet**: Hybrid. Often resembles desktop but with touch targets.103104## Accessibility & Inclusive Design105106* **Contrast & readability**: Prefer sufficient contrast (dark/light); avoid low-contrast text. In prompts, you can add "high contrast" or "clear text hierarchy."107* **Touch targets**: For mobile/tablet, ask for touch-friendly controls (e.g. "buttons at least 44px tap area"). In Context or Component details, add "touch-friendly" when relevant.108* **Focus & keyboard**: For desktop, mention "clear focus states" or "keyboard-navigable" when the design should support accessibility.109* **In prompts**: Add phrases like "high contrast," "clear focus states," "touch-friendly buttons" in Context/Style or Component Details when UED or accessibility alignment is needed.110111## Controls & Variants112113* **Variants**: Stitch generates multiple options. You can ask to "Generate variants for the hero section" to A/B test designs.114* **Controls**: Use the **Interactive Chat** to refine designs ("Make the button blue", "Move the logo to the center").115116## Related resources117118- **Stitch Effective Prompting Guide**: https://stitch.withgoogle.com/docs/learn/prompting/ — official best practices; consult for up-to-date recommendations.119- **Division of labor**: **stitch-ued-guide** = structure and vocabulary (how to phrase, what terms to use). **stitch-ui-prompt-architect** = transform vague ideas into a full, executable Stitch prompt (with DESIGN.md, framework contracts). Use both when you need consistent UED wording and concrete prompt output.120- **Vague → enhanced prompt**: Use **stitch-ui-prompt-architect** (Path A: enhance vague UI ideas with specificity, UI/UX keywords, DESIGN.md context). Use with **stitch-design-md** for DESIGN.md and **stitch-ui-design-spec-generator** for full flow.121- **Stitch skills in this repo** (prefer these over official): design-md → **stitch-design-md**; enhance-prompt → **stitch-ui-prompt-architect** (two paths + framework contracts); react-components → **stitch-react-components**; stitch-loop → **stitch-loop**; remotion → **stitch-remotion**; shadcn-ui → **stitch-shadcn-ui**. Plus **stitch-mcp-*** (one skill per MCP tool: create-project, get-project, list-projects, generate-screen-from-text, get-screen, list-screens), **stitch-ui-design-spec-*** (Bootstrap, Element Plus, Layui, uView, uView Pro, Vant), **stitch-ui-designer** (orchestrator), and six Stitch→framework conversion skills (Vue + Element/Bootstrap/Layui/Vant, uni-app + uView/uView Pro). These skills reference each other and the same MCP; use stitch-mcp-<tool> names (e.g. get_screen → stitch-mcp-get-screen).122123## References124125- [Examples](examples/usage.md)126127## 能力边界128129### ✅ 适用场景130- 当你需要使用此技能对应的技术栈时131- 当项目需要遵循最佳实践时132- 当需要快速上手或深入理解核心概念时133134### ⚠️ 需要注意135- 复杂业务逻辑需要结合具体场景调整136- 性能优化需要根据实际数据量评估137138### ❌ 不适用场景139- 不相关的技术栈或框架140- 需要完全自定义的特殊场景141142## 常见陷阱 (Gotchas)1431441. **版本兼容性**:注意框架版本与依赖库的兼容性,不同版本 API 可能有差异1452. **配置文件格式**:配置文件格式错误是最常见的问题,建议使用编辑器的语法检查1463. **环境变量**:确保所有必要的环境变量已正确设置,敏感信息不要硬编码1474. **依赖冲突**:多版本共存时注意依赖冲突,使用 lock 文件锁定版本1485. **性能陷阱**:大数据量场景下注意性能优化,避免 N+1 查询等常见问题149150## 使用流程151152### Step 1: 环境准备153确保开发环境已安装必要的依赖和工具。154155### Step 2: 配置初始化156根据项目需求进行基础配置。157158### Step 3: 核心功能使用159按照示例代码实现核心功能。160161### Step 4: 测试验证162运行测试确保功能正常。163164### Step 5: 部署上线165完成开发后进行部署和监控。