AnimWeb-Bench: Benchmarking Animated Webpage Code Generation from Videos

The Chinese University of Hong Kong
AnimWeb-Bench Overview

Can AI systems reconstruct not only the visual states of a webpage, but also the continuous dynamics connecting them?

To address this challenge, we introduce AnimWeb-Bench, the first benchmark for animated webpage code generation from videos.

Abstract

Animation is pervasive on the Web, the CSS animation property alone appears on over three-quarters of webpages. Yet existing webpage code generation benchmarks target static screenshots, user-triggered interactions, or isolated motion graphics, leaving the ability of multimodal large language models (MLLMs) and coding agents to reconstruct complete animated webpages largely unexplored. To fill this gap, we introduce AnimWeb-Bench, the first benchmark for animated webpage code generation from videos. It comprises 124 real-world webpages spanning 7 application domains and 33 animation types, with 91.9% of pages combining multiple types, each paired with a reference video and the static assets of the original webpage. We further propose a human-aligned, two-dimensional evaluation protocol: Static Appearance Fidelity measures structure, text, color, and visual similarity on aligned keyframes, while Animation Fidelity tracks UI components across frames and compares their position, size, velocity, and appearance with those in the reference video. Evaluating 14 MLLMs and three coding agents reveals: (1) reproducing webpage animations is substantially more difficult than reproducing static appearance; (2) explicit frame inspection and render feedback improve the reconstruction quality of coding agents; and (3) rapid, continuous changes are harder to reproduce than discrete state transitions.

Dataset Construction

AnimWeb-Bench Dataset Construction Pipeline

Scope. AnimWeb-Bench focuses on time-driven, page-embedded animations that unfold automatically during the initial page load. We consider animations implemented through DOM elements using CSS or JavaScript, where motion is integrated with the webpage's layout, text, and media.

Webpage sourcing. We draw webpages from Awwwards, a web-design showcase whose entries are reviewed by a jury of professional designers and developers. Starting from sites carrying the Animation tag, we crawled up to 100 sites per application domain, collecting 473 URLs of sites submitted between 2025 and 2026. Removing duplicate and inaccessible sites left 452 candidates.

Recording and asset collection. We load each page in headless Chromium (v151.0.7922.34) driven by Puppeteer with a 1920 × 1080 viewport and record it at 30 fps (H.264, MP4) from navigation start. Each recording lasts 2–15 s (mean 5.91 s) and covers the page's initial animation sequence, or one full cycle of a looping animation. We also crawl and deduplicate the static assets needed for reconstruction, i.e., images, icons, and embedded videos (46.1 per page on average).

Annotation and quality control. We first use GPT-5.6 Sol to propose a domain and a set of animation-type labels for each recording from the video and the page source. Three PhD students with front-end development experience then review every instance: they correct the labels, supplement missing assets, and verify that the recording captures the complete animation.

Dataset Statistics

AnimWeb-Bench comprises 124 real-world webpages spanning 7 application domains and 33 animation types. With 91.9% of webpages combining multiple animation types, the benchmark captures the diversity and complexity of animations found on real-world websites.

Video and Asset Statistics

Metric Min Max Mean ± Std
Duration (s) 2.0 15.0 5.91 ± 2.47
Segments 1 11 2.83 ± 1.84
Tracklets 2 120 35.4 ± 24.1
Asset Files 2 422 46.1 ± 53.6
Application domain and animation type diversity

Domain distribution of AnimWeb-Bench.

Code Complexity

We compare the code complexity of AnimWeb-Bench with existing webpage code generation benchmarks using HTML length, tag count, DOM depth, and the number of unique tags.

Metric Design2Code WebCode2M MRWeb Animation2Code AnimWeb-Bench
Length (tokens) 31,216
± 23,902
5,366
± 2,393
113,724
± 139,761
5,427
± 13,678
239,303
± 487,624
Tags 158
± 100
184
± 77
543
± 768
71
± 247
1,196
± 894
DOM Depth 13
± 5
15
± 5
15
± 6
5
± 3
18
± 4
Unique Tags 22
± 6
24
± 6
22
± 8
7
± 2
33
± 7

Animation Type Distribution

AnimWeb-Bench contains 404 animation-type annotations, averaging 3.3 types per webpage.

View All 33 Animation Types
Animation Type Count Animation Type Count
Translation64 Fade Out12
Background Transition50 Rotation11
Appearance49 Numeric Counter Animation10
Masking32 Scale Down8
Fade In30 Text Substitution7
Text Animation24 Image Stack Animation5
Scale Up22 Typewriter Animation5
Color Transition14 Vertical Stripe Reveal5
Line Growth13 Appearance & Opacity Changes5
Blur Transition4 3D Depth Motion3
Icon State Animation4 Grid Tile Transition3
Shake4 Icon State Transition3
Font Weight Animation2 Text Scramble3
Horizontal Image Slide2 Twinkling3
Vertical Image Slide2 Card Flip2
Logo Morphing1 Text Fragmentation1
Radial Expansion Animation1

UI Component Detection and Tracking

An illustration of UI component detection and tracking across frames of an animated webpage.

Experimental Results

We evaluate 14 MLLMs and 3 coding agents on AnimWeb-Bench. Our experiments investigate overall reconstruction performance, the effectiveness of coding agents, the impact of animation types, and alignment with human judgments.

RQ1: Overall Performance

How well do state-of-the-art MLLMs reconstruct animated webpages?

Model Static Appearance Fidelity Animation Fidelity
Structure Text Color CLIP Position Size Velocity CLIP
Proprietary MLLMs
GPT-6 Astra 0.6974 0.7804 0.7452 0.8796 0.4532 0.4193 0.3043 0.4303
GPT-6 Sol 0.5754 0.6726 0.6557 0.8084 0.3735 0.3359 0.2401 0.3511
GPT-5.6 Sol 0.5598 0.6503 0.6604 0.7898 0.3577 0.3164 0.2312 0.3355
Claude Fable 5.1 0.5952 0.7101 0.7014 0.8516 0.3928 0.3495 0.2653 0.3660
Claude Opus 5 0.5183 0.6240 0.6464 0.7907 0.3123 0.2710 0.2048 0.2922
Grok 4.7 0.4575 0.6384 0.6169 0.7776 0.3170 0.2561 0.2133 0.2960
Qwen3.8 Max (0902)† 0.4273 0.5797 0.5589 0.7643 0.3016 0.2446 0.2026 0.2793
Gemini 3.1 Pro Preview† 0.3453 0.5212 0.5449 0.7046 0.2313 0.1790 0.1456 0.2148
Gemini 3.8 Flash† 0.3324 0.5061 0.5220 0.6794 0.2301 0.1761 0.1530 0.2117
Doubao-Seed-2.1-pro† 0.3378 0.4695 0.5149 0.6127 0.2060 0.1586 0.1238 0.1908
Open-Weight MLLMs
Kimi K3† 0.5373 0.6775 0.6564 0.8204 0.3463 0.2978 0.2246 0.3218
DeepSeek V4.1 Flash 0.4393 0.5820 0.5854 0.7530 0.3063 0.2543 0.1983 0.2836
GLM 5.3 Flash† 0.4293 0.5707 0.5750 0.7441 0.2953 0.2390 0.1960 0.2733
Qwen3 VL 235B A22B Thinking† 0.2395 0.4032 0.4337 0.5770 0.1702 0.1294 0.1170 0.1584

Performance comparison. All metrics are higher-is-better. Models marked with † receive the native video, and the others receive frames sampled at 2 fps. The best and second-best scores are marked in bold and underlined, respectively.

Systems Look Right but Move Wrong.

Animation fidelity is low across the board. Even GPT-6 Astra, the strongest model, scores below 0.46 on every animation metric, and ten of the remaining thirteen models stay below 0.35. For every model, each animation score falls below each static score, and Velocity is the lowest of all eight metrics. Because the two dimensions are computed differently, their absolute values are not directly comparable. Two further observations, however, show that the gap reflects motion rather than scale. Animation metrics respond to the kind of motion on a page while static metrics do not, and human annotators prefer every evaluated model over the baseline less often on animation than on static appearance.

Current models fail to infer and encode component-level dynamics in three ways. First, some animated components are missing from the generated page altogether, and their unmatched trajectories lower all four animation scores. Second, even when a component is animated, its trajectory or manner of change may deviate from the reference. For example, sliding along a different path or scaling instead of sliding, which lowers Position and Size. Third, and most subtle, is the temporal behavior of motion, namely when and how fast each component moves. Components may move faster, slower, or in a different direction than in the reference, which lowers Velocity. They may also appear at the wrong time: elements that the reference reveals gradually or one after another may appear all at once in the generated page, leaving time steps at which only one of the matched components is present and thus lowering all four animation scores. Faithfully recovering how a webpage moves thus remains an open challenge for current models.

Proprietary Models Lead, but Open-Weight Models Are Closing In.

GPT-6 Astra leads all eight metrics, and Claude Fable 5.1 ranks second on every metric. Among open-weight models, Kimi K3 ranks third in static Text and CLIP, surpassing GPT-6 Sol, and fifth across all animation metrics, outperforming Claude Opus 5 and approaching GPT-5.6 Sol. DeepSeek V4.1 Flash and GLM 5.3 Flash perform on par with the proprietary Grok 4.7 and Qwen3.8 Max (0902), and all four outperform the two Gemini models and Doubao-Seed-2.1-pro across all metrics.