figma-to-code

Solid

Extract Figma designs and generate production-ready React/Next.js components with TypeScript, Tailwind CSS, and pixel-perfect accuracy. Use when a user provides a Figma URL or asks to convert Figma designs to code.

AI & Automation 140 stars 15 forks Updated today MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
72
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Figma to Code - Production-Ready Component Generator ## ๐ŸŽฏ Purpose Extract **complete, lossless** design information from Figma and generate production-ready React/Next.js components with TypeScript and Tailwind CSS. --- ## ๐Ÿšจ CRITICAL RULES - Read First! ### **Rule 1: NEVER Truncate Code** Use **100% of Figma MCP output**. Every className, every property matters. ```tsx // โœ… CORRECT: Keep ALL className from Figma MCP <div className="absolute font-source-serif h-[108px] leading-[1.8] left-[100px] not-italic text-[20px] text-[rgba(29,38,45,0.8)] text-justify top-[210px] w-[1096px] whitespace-pre-wrap"> // โŒ WRONG: Removing any className <div className="absolute left-[100px] top-[210px] font-source-serif text-[20px]"> ``` ### **Rule 2: Flatten `absolute contents` Structures** **๐Ÿ”ฅ CRITICAL: Figma MCP returns nested `absolute contents` containers. `display: contents` makes the parent "disappear" - children are positioned relative to the nearest positioned ancestor (root)!** **Key Insight: Children's positions are ALREADY absolute - DO NOT add parent's top/left!** ```tsx // โŒ WRONG: Figma MCP output (has redundant parent wrapper) <div className="absolute contents left-0 top-[41px]"> <p className="absolute left-[100px] top-[41px]">TITLE</p> <div className="absolute left-0 top-[100px]">Line</div> </div> // โœ… CORRECT: Just remove the parent wrapper, keep children's positions AS-IS <> <p className="absolute left-[100px] top-[41px]">TITLE</p> <div className="abs...

Details

Author
majiayu000
Repository
majiayu000/claude-arsenal
Created
5 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content โ€” not just same category