MulFCoder: Framework-conditioned Multi-agent for MLLM-based Multi-framework Front-end Code Generation
Organizations: Communication University of China · Harvard University · Tsinghua university · University of Southern California ·
Abstract
Generating runnable front-end code from UI screenshots is a long-standing goal in automated software engineering. Existing MLLM-based methods predominantly focused on HTML/CSS, leaving multi-framework generation for React/Vue/Angular underexplored. Naively modifying prompts leads to substantial performance gaps across multi-framework and highly framework-specific error modes. To address this, we propose MulFCoder, a framework-conditioned multi-agent method that explicitly encodes framework constraints to bring multi-framework differences into a decidable rule space. MulFCoder orchestrates four agents: Grounder constructs an ElementTable, ContentTable, and macro-layout regions from detected UI elements; Planner builds a DOM-like hierarchical layout tree, produces a task schedule, and derives a framework-specific file Contract; Writer generates structured file writes or patches within a restricted edit window; Judger enforces lightweight, framework-conditioned constraints to accept or reject updates and trigger bounded repairs, preventing drift and deadlocks without expensive builds. Experiments demonstrate that MulFCoder substantially improves compilation success rate and reduces framework-specific errors, with particularly pronounced gains on Angular.
Figures & tables
| Base Model | Design2Code | DesignBench | Design2Code | DesignBench | ||||
|---|---|---|---|---|---|---|---|---|
| CLIP | CSR | CLIP | CSR | CLIP | CSR | CLIP | CSR | |
| VANILLA | REACT | |||||||
| Gemini-2.5-Pro | ||||||||
| + MulFCoder | \mathbf{0.94}^{{\color[rgb]{0.7,0,0}+0.02}} | \mathbf{0.87}^{{\color[rgb]{0.7,0,0}+0.04}} | \mathbf{0.93}^{{\color[rgb]{0.7,0,0}+0.02}} | \mathbf{0.98}^{{\color[rgb]{0.7,0,0}+0.01}} | \mathbf{0.85}^{{\color[rgb]{0.7,0,0}+0.01}} | \mathbf{0.96}^{{\color[rgb]{0.7,0,0}+0.05}} | ||
| GPT-4o | ||||||||
| + MulFCoder | \mathbf{0.93}^{{\color[rgb]{0.7,0,0}+0.02}} | \mathbf{0.84}^{{\color[rgb]{0.7,0,0}+0.03}} | \mathbf{0.90}^{{\color[rgb]{0.7,0,0}+0.01}} | \mathbf{0.98}^{{\color[rgb]{0.7,0,0}+0.02}} | \mathbf{0.81}^{{\color[rgb]{0.7,0,0}+0.02}} | \mathbf{0.98}^{{\color[rgb]{0.7,0,0}+0.04}} | ||
| Model | Design2Code | DesignBench | ||||
|---|---|---|---|---|---|---|
| React | Vue | Angular | React | Vue | Angular | |
| Gemini. | 35.7% | 57.6% | 40.3% | 55.6% | 47.1% | 27.8% |
| GPT. | 52.6% | 55.8% | 47.3% | 66.7% | 46.7% | 23.6% |
| Doubao. | 51.7% | 50.0% | 47.7% | 46.2% | 37.0% | 37.5% |
| Qwen. | 54.7% | 47.6% | 44.6% | 47.6% | 32.4% | 35.5% |
| LLaVA. | 47.2% | 42.2% | 37.3% | 36.0% | 31.0% | 31.4% |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Model | Easy | Medium | Hard | ||||||
|---|---|---|---|---|---|---|---|---|---|
| React | Vue | Angular | React | Vue | Angular | React | Vue | Angular | |
| Gemini-2.5-Pro+ | 1.00 | 0.98 | 0.95 | 1.00 | 0.86 | 0.85 | 0.89 | 0.89 | 0.62 |
| GPT-4o+ | 1.00 | 1.00 | 0.87 | 1.00 | 0.86 | 0.75 | 0.93 | 0.89 | 0.44 |
| Doubao-Seed-1.6+ | 1.00 | 0.96 | 0.93 | 0.89 | 0.86 | 0.80 | 0.88 | 0.66 | 0.57 |
| Qwen2.5-VL-7B+ | 0.95 | 0.92 | 0.85 | 0.85 | 0.83 | 0.75 | 0.84 | 0.50 | 0.40 |
| LLaVA-v1.5-7B+ | 0.96 | 0.87 | 0.81 | 0.85 | 0.76 | 0.70 | 0.66 | 0.30 | 0.10 |
Code Generation
Code generation studies methods for turning natural-language, visual, or formal specifications into executable programs and code edits.
See all 321 papers