Datasets:
image imagewidth (px) 46 3.36k | label class label 127
classes |
|---|---|
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
01 | |
110 | |
110 | |
110 | |
110 | |
110 | |
110 | |
110 | |
110 | |
110 | |
110 | |
110 | |
110 | |
110 | |
110 | |
110 | |
2100 | |
2100 | |
2100 | |
2100 | |
2100 | |
2100 | |
2100 | |
2100 | |
2100 | |
2100 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
3101 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 | |
4102 |
Interaction2Code: Benchmarking MLLM-based Interactive Webpage Code Generation from Interactive Prototyping
Project Page | Paper | GitHub
Interaction2Code is the first systematic investigation and benchmark for Multimodal Large Language Models (MLLMs) in generating interactive webpages. While existing benchmarks focus on static UI-to-code tasks, Interaction2Code encompasses 127 unique webpages and 374 distinct interactions across 15 webpage types and 31 interaction categories to evaluate dynamic interaction generation.
Dataset Structure
The full dataset contains 127 subfolders, each corresponding to a unique webpage. Each subfolder contains:
- Interactive Prototyping Images: Screenshots representing the webpage states (e.g.,
0.pngfor the initial state,1.pngfor the state after an interaction). - action.json: A metadata file describing the interaction, including the source/destination images, tag types (e.g., button, image), and visual types (e.g., new component, color).
Example action.json
{
"link": "https://salinaka-ecommerce.web.app/shop",
"topic": "shop",
"framework": "react",
"1": {
"src": "0",
"dst": "1",
"tag type": [
"image",
"span"
],
"visual type": [
"new component",
"text",
"position"
]
}
}
Sample Usage
Based on the official GitHub repository, you can use the following snippet to generate interactive webpage code (ensure you have configured your API keys in key.json within the repo structure):
# Assuming you are in the code/prompting directory of the repository
from generate import generate_page
# prompt_method: direct_prompt/cot_prompt/mark_prompt/critic_prompt
generate_page(
path="../../sample/",
web_number=1,
interact_number=1,
prompt_method="direct_prompt"
)
Citation
If you find this benchmark or code useful, please consider citing the paper:
@INPROCEEDINGS{xiao2025interaction2code,
author={Xiao, Jingyu and Wan, Yuxuan and Huo, Yintong and Wang, Zixin and Xu, Xinyi and Wang, Wenxuan and Xu, Zhiyao and Wang, Yuhang and Lyu, Michael R.},
booktitle={2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE 2025)},
title={Interaction2Code: Benchmarking MLLM-based Interactive Webpage Code Generation from Interactive Prototyping},
year={2025},
volume={},
number={},
pages={241-253},
doi={10.1109/ASE63991.2025.00028}
}
- Downloads last month
- 1,803