Verify rendered code against the Figma design
figma_verifyRenders HTML or a running app in Chromium, pixel-diffs it against a Figma frame, and reports missing, misplaced, or clipped elements so you can iterate toward pixel-exact code.
Instructions
Render an HTML file in Chromium, pixel-diff it against the Figma reference, and check each element position with bounding-box IoU, paint order (z-index) and clipping. Returns the diff ratio plus specific instructions on what to fix (MISSING / MISPLACED / WRONG STACKING / OVER-CLIPPED elements, worst regions). Writes render.png and diff.png. Edit the HTML based on the correction and call this again to iterate toward pixel-exact. Read the returned diff.png to see the mismatches highlighted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | Yes | Cache dir from figma_convert. Supplies reference.png and ir.json. | |
| url | No | Verify a RUNNING page instead of the generated HTML — e.g. your own app at http://localhost:3000/pricing, built in any framework. The page is screenshotted at the frame size and pixel-diffed against the Figma reference. Element/layering checks need the converter's data-ir-id markers, so for a URL only the pixel diff runs. | |
| width | No | Viewport width. Defaults to the design frame width from the IR. | |
| height | No | Viewport height. Defaults to the design frame height from the IR. | |
| fullPage | No | Capture full scroll height rather than just the viewport. | |
| htmlPath | No | HTML file to verify. Defaults to <dir>/generated.html. | |
| selector | No | With url: CSS selector of the element to compare (e.g. "#pricing-card"). Default: the viewport. | |
| threshold | No | Diff ratio considered "exact enough". Anti-aliasing puts a floor near 0.005-0.015. | |
| includeImages | No | Attach reference/render/diff PNGs to the response. Costs a lot of context — prefer reading diff.png from disk only when the numbers alone are not enough. |