Figma to High-Fidelity HTML
Paste the following prompt into your AI chat to install this skill:
Please install @user_24c316b5/figma-to-html according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Front-end work often needs a Figma frame converted into a presentable HTML page, but the hard part is not producing markup; it is preserving spacing, typography, image sizes, and responsive behavior without guessing from screenshots. This workflow treats structured Figma data as the primary source of truth and uses the screenshot mainly for visual calibration.
Workflow and limitations
The input usually includes a Figma URL with a node-id, a reference screenshot, and optional image node IDs. Key steps include:
- Fetch design data: parse fileKey and nodeId, call the Figma data interface, and save the result as figma.json.
- Download assets: identify imageRef, IMAGE-SVG, and user-specified nodes, then save them under images/ with names such as icon-*.svg, img-*.png, and bg-*.png.
- Generate single-file HTML: derive layout, typography, fills, borders, shadows, and text from layout, textStyle, fills, borderRadius, and effects, using inline CSS.
- Calibrate and adapt: prioritize figma.json values for spacing, dimensions, and font metrics, compare against the screenshot, and add @media breakpoints for small screens.
This is useful for quickly producing a previewable static page from a Figma frame. Effects that cannot be faithfully expressed in HTML/CSS, such as complex SVG animation or special filters, should be recorded as limitations rather than silently approximated.
Use Cases
- Generate previewable high-fidelity HTML from a Figma node URL.
- Export Figma images and icons into images/ and reference them in single-file HTML.
- Compare the draft against a screenshot to fix spacing, typography, and colors, then add breakpoints.
- Convert Figma nav, sidebar, inputs, and cards into semantic HTML elements.
Best For
- Front-end engineers who need to turn Figma frames into shareable static HTML pages.
- Product designers who want previewable HTML prototypes without manually copying spacing and type.
- Full-stack engineers who need semantic page structure and responsive adaptation from designs.
- Implementers who need Figma image assets exported and referenced in a single-file HTML page.
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
A comprehensive browser automation guide covering navigation, interaction, multi-tab management, and data collection, tailored for domestic web ecosystems and tools like Playwright/Selenium.
Control Windows WeChat through GUI automation to search contacts and send text, images, or files without official APIs.