Purpose: Quick reference for design tools used in WDS workflows, particularly for prototype-to-Figma extraction.
Purpose: Precise component injection from HTML prototypes to Figma
Use Case in WDS: Extract specific components for visual refinement with full traceability
See: mcp-server-integration.md for complete documentation
Component-Level Precision:
Conversion Capabilities:
Preservation:
1. Prepare Prototype
Ensure your HTML prototype:
- Uses semantic HTML elements
- Has Object IDs on all components (data-object-id)
- Uses Flexbox or Grid for layouts
- Has clean CSS structure
2. Inject via MCP Server
# Single component
wds figma inject btn-login-submit --file abc123
# Multiple components
wds figma batch inject --list components.txt --file abc123
# Entire section
wds figma inject-section login-form --file abc123
3. Verify in Figma
- Open target Figma file
- Navigate to injection page
- Verify components injected correctly
- Check Object IDs preserved
4. Read Refined Components Back
# After designer refines in Figma
wds figma read btn-login-submit --file abc123 --update-design-system
✅ Component-level precision - Inject only what needs refinement
✅ Object ID preservation - Automatic mapping maintained
✅ Bidirectional sync - Read refined components back
✅ Batch operations - Efficient multi-component extraction
✅ Direct integration - Seamless WDS workflow
✅ Automated token extraction - Design system updates automatic
Purpose: Manual HTML to Figma conversion (fallback option)
Website: https://html.to.design
Use Case in WDS: When MCP server unavailable or for full-page extraction
Note: MCP server approach is preferred for component-level precision and traceability.
Use when:
Don't use when:
1. Prepare Prototype
Ensure your HTML prototype:
- Uses semantic HTML elements
- Has clean CSS structure
- Uses Flexbox or Grid for layouts
2. Upload to html.to.design
1. Go to https://html.to.design
2. Upload HTML file
3. Include associated CSS files
4. Select target: Figma
3. Import to Figma
1. Download converted Figma file
2. Open in Figma
3. Manually add Object IDs to layers
4. Begin refinement
Limitations:
DO ✅
DON'T ❌
What Works Well:
What May Need Manual Adjustment:
1. Simplify Structure
<!-- Before: Complex nesting -->
<div class="wrapper">
<div class="container">
<div class="inner">
<div class="content">Text</div>
</div>
</div>
</div>
<!-- After: Simplified -->
<div class="content-wrapper">
<p>Text</p>
</div>
2. Use Flexbox/Grid
/* Preferred: Flexbox */
.container {
display: flex;
gap: 16px;
padding: 24px;
}
/* Avoid: Absolute positioning */
.item {
position: absolute;
top: 50px;
left: 100px;
}
3. Include Object IDs
<!-- Good: Object ID for traceability -->
<button data-object-id="btn-login-submit" class="btn-primary">
Log In
</button>
4. Clean CSS
/* Preferred: Token-based */
.button {
background: var(--color-primary-600);
padding: var(--spacing-md) var(--spacing-lg);
border-radius: var(--radius-md);
}
/* Avoid: Hardcoded values scattered -->
.button {
background: #2563eb;
padding: 12px 16px;
border-radius: 8px;
}
Purpose: Agent-driven asset creation, design inspiration, and sketch envisioning tool
Website: https://nanobanana.com
Use Cases in WDS:
Output Formats:
Description: Agent-driven Photoshop - AI-powered tool for visual asset creation and design exploration
Asset Creation Capabilities:
Workflow:
Design Concept
→ NanoBanana (create assets/inspiration)
→ Visual Assets/Design Ideas
→ Import to Figma for refinement
→ Integrate into Design System
→ Use in Prototypes
When to Use:
When to Skip:
DO ✅
DON'T ❌
Purpose: Precise region mapping in HTML prototypes for interactive hotspots
Use Case in WDS: Map clickable regions on image-based prototypes or complex UI elements
HTML <area> elements within <map> tags that define clickable regions on images:
<img src="prototype-screenshot.png" usemap="#prototype-map" alt="Prototype">
<map name="prototype-map">
<area shape="rect"
coords="100,50,300,150"
data-object-id="btn-login"
alt="Login Button"
href="#login">
<area shape="rect"
coords="100,200,300,250"
data-object-id="link-signup"
alt="Sign Up Link"
href="#signup">
</map>
Use When:
Don't Use When:
The dev-mode.js component can extract area tag coordinates:
// Dev mode detects area tags
document.querySelectorAll('area').forEach(area => {
const coords = area.coords;
const objectId = area.dataset.objectId;
console.log(`${objectId}: ${coords}`);
});
1. Get Coordinates
Use image editor or browser dev tools:
- Top-left corner: (x1, y1)
- Bottom-right corner: (x2, y2)
- Format: "x1,y1,x2,y2"
2. Define Area
<area shape="rect"
coords="x1,y1,x2,y2"
data-object-id="unique-id"
alt="Description"
href="#target">
3. Link to Map
<img src="image.png" usemap="#mapname">
<map name="mapname">
<!-- area tags here -->
</map>
DO ✅
DON'T ❌
Area tags have limitations:
Workaround:
<!-- Add keyboard support -->
<area shape="rect"
coords="100,50,300,150"
data-object-id="btn-login"
alt="Login Button"
href="#login"
tabindex="0"
role="button">
Purpose: Interactive tool for extracting Object IDs and area coordinates from prototypes
Location: workflows/wds-4-ux-design/agentic-development/templates/components/dev-mode.js
Object ID Extraction:
Area Tag Extraction:
1. Include in Prototype
<script src="shared/dev-mode.js"></script>
2. Activate Dev Mode
- Click "Dev Mode" button, or
- Press Ctrl+E (Cmd+E on Mac)
3. Extract Object IDs
- Hold Shift
- Click on element
- Object ID copied to clipboard
4. Extract Area Coordinates
- Dev mode detects area tags
- Displays coordinates
- Exports mapping data
Workflow:
1. Create prototype with Object IDs
2. Use dev mode to verify Object IDs
3. Extract to Figma via html.to.design
4. Object IDs preserved in layer names
5. Maintain traceability
| Tool | Category | Primary Use | Input | Output | WDS Use Case |
|---|---|---|---|---|---|
| MCP Server | Figma Integration | Automated sync | HTML + Object ID | Figma components | Precise refinement (PRIMARY) |
| html.to.design | HTML → Figma | Full-page conversion | HTML/CSS | Figma file | Fallback method (OPTIONAL) |
| NanoBanana | AI Design | Asset creation + Sketch envisioning | Text/Sketch/Spec | Images or Code | Early exploration OR sketch-to-design (OPTIONAL) |
| Area Tags | Region mapping | Clickable regions | Image + coords | Clickable map | Image prototypes |
| Dev Mode | ID extraction | Object ID tracking | Prototype | Object IDs | Traceability |
1. Create specification (Phase 4C)
2. Build HTML prototype manually (Phase 4D)
3. Add Object IDs to all components
4. Test functionality
5. Inject specific components to Figma via MCP server (if needed)
6. Refine in Figma
7. Read refined components via MCP server
8. Design system auto-updated
9. Re-render prototype
Advantages:
1. Create specification (Phase 4C)
2. Build HTML prototype manually (Phase 4D)
3. Add Object IDs to all elements
4. Test functionality
5. Upload to html.to.design (if MCP unavailable)
6. Manually add Object IDs to Figma layers
7. Refine in Figma
8. Manually extract design tokens
9. Update design system manually
10. Re-render prototype
Use when: MCP server not available
1. Create specification (Phase 4C)
2. Use NanoBanana for design inspiration/assets (optional)
3. Import assets to Figma
4. Build HTML prototype manually (Phase 4D)
5. Add Object IDs to all components
6. Test functionality
7. Inject to Figma via MCP server (if needed)
8. Refine in Figma (with NanoBanana assets)
9. Read back via MCP server
10. Design system auto-updated
11. Re-render prototype
Use NanoBanana for:
1. Create specification (Phase 4C)
2. Create image-based prototype
3. Add area tags for clickable regions
4. Include Object IDs in area tags
5. Test click regions
6. Extract to Figma via html.to.design
7. Refine in Figma
8. Convert to HTML prototype
9. Update design system
Problem: Layout not preserved Solution: Use Flexbox/Grid, simplify structure
Problem: Styles not converted Solution: Use standard CSS properties, avoid complex selectors
Problem: Text content missing Solution: Ensure text is in HTML, not JavaScript-generated
Problem: Generated code doesn't match design system Solution: Customize output, apply design system manually
Problem: Complex interactions not generated correctly Solution: Review and rewrite interaction logic
Problem: Clicks not registering Solution: Verify coordinates, check map name matches
Problem: Accessibility concerns Solution: Add keyboard support, use actual HTML when possible
Problem: Object IDs not copying Solution: Check Shift key, verify Object IDs exist
Problem: Dev mode not activating Solution: Check script loaded, try Ctrl+E
html.to.design:
NanoBanana:
HTML Area Tags:
WDS Documentation:
workflows/wds-4-ux-design/agentic-development/workflows/wds-6-asset-generation/workflow-figma.mdworkflows/wds-4-ux-design/agentic-development/templates/components/This reference provides quick access to tool information for WDS design workflows. For detailed workflows, see the specific workflow documentation files.