# Figma to react

> Figma to react is an open-source agent skill for design and media. Turns Figma designs into React or Next.js components with TypeScript and Tailwind. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/majiayu000/spellbook/tree/main/plugins/spellbook-ui/skills/figma-to-react
- **Repository:** https://github.com/majiayu000/spellbook
- **GitHub stars:** 303
- **License:** MIT
- **Skill name:** figma-to-react
- **Collection:** https://github.com/majiayu000/spellbook
- **Categories:** [design and media](https://ai-powered.com/categories/design-and-media)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through converting a Figma frame into React or Next.js components using TypeScript and Tailwind CSS, with the aim of close visual fidelity to the source design. It is built around rules for handling the output of the Figma MCP server, including keeping every generated class, reading frame dimensions from node metadata instead of guessing them, and flattening nested absolute-positioned wrappers so child coordinates are not offset twice.

The rules also cover typography in detail. The agent is told to load Google Fonts through a stylesheet link rather than the Next.js font loader, to map Figma font names onto standard family names and Tailwind weight classes, and to check weights against a screenshot because Figma's weight labels often render lighter than CSS values. Other guidance covers page-level CSS for horizontal scrolling, replacing image-based rules with CSS lines, inlining SVG assets, and removing fixed heights from multi-line text blocks.

The skill expects a Figma file key and node ID, access to the Figma MCP tools, and a React or Next.js project. Longer material on table patterns and implementation templates sits in a separate reference file that the agent loads when needed.

## When your agent uses it

> Use when the user wants to extract Figma designs into production-ready React or Next.js components with TypeScript, Tailwind CSS, and pixel-perfect accuracy.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/majiayu000/spellbook/tree/HEAD/plugins/spellbook-ui/skills/figma-to-react)
- [License: MIT](https://github.com/majiayu000/spellbook/tree/HEAD/plugins/spellbook-ui/skills/figma-to-react)

## Features

- **Figma metadata extraction:** Reads frame size and node structure from Figma metadata so dimensions are not hardcoded.
- **Absolute position flattening:** Removes redundant wrappers from nested absolute containers while keeping child coordinates correct.
- **Google Fonts mapping:** Loads fonts via the Google Fonts stylesheet and converts Figma font names to Tailwind classes.
- **Weight adjustment guidance:** Advises comparing font weights with a Figma screenshot since Figma labels often render lighter.
- **Text block cleanup:** Removes fixed heights from multi-line text so wrapping can adjust in the browser.
- **Inline SVG conversion:** Replaces external image assets with inline SVG and CSS-based lines.

## Good for

- Convert a Figma landing page frame into a Next.js component with Tailwind
- Turn a Figma card design into a typed React component
- Recreate a Figma dashboard section pixel-close in a React project
- Replace image-based divider lines from Figma with CSS lines

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/figma-to-react` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/figma-to-react &&
cp -R "$tmp/plugins/spellbook-ui/skills/figma-to-react" ~/.claude/skills/figma-to-react &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/figma-to-react` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/figma-to-react` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/figma-to-react &&
cp -R "$tmp/plugins/spellbook-ui/skills/figma-to-react" ~/.agents/skills/figma-to-react &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/figma-to-react` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/figma-to-react` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/figma-to-react &&
cp -R "$tmp/plugins/spellbook-ui/skills/figma-to-react" ~/.cursor/skills/figma-to-react &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/figma-to-react` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/majiayu000/spellbook.git --path plugins/spellbook-ui/skills/figma-to-react
```

Or copy the folder to `~/.gemini/skills/figma-to-react` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/figma-to-react`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/figma-to-react &&
cp -R "$tmp/plugins/spellbook-ui/skills/figma-to-react" ~/.copilot/skills/figma-to-react &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/figma-to-react` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/majiayu000/spellbook.git
```

Then copy `spellbook/plugins/spellbook-ui/skills/figma-to-react` into your agent's skills folder as `figma-to-react`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It needs access to the Figma MCP tools to fetch metadata and design output, plus a React or Next.js project using TypeScript and Tailwind CSS.

### Does Figma to react use next/font/google?

No. The skill instructs the agent to load Google Fonts through a stylesheet link in the layout instead, because rendering can differ.

### Are there scripts included?

No, the skill has no scripts; it consists of instructions and one reference file for extended material.

### How do I install Figma to react in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/figma-to-react to use it in all your projects, or to .claude/skills/figma-to-react in one project.

### Does Figma to react run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Figma to react?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Figma to react?

The closest alternatives to Figma to react are Figma, Figma implement design, Figma implement design, Figma from code and Figma to code.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Figma](https://ai-powered.com/skills/figma-openai): Figma is a free agent skill for design and media.
- [Figma implement design](https://ai-powered.com/skills/figma-implement-design): Figma implement design is a free agent skill for design and media.
- [Figma implement design](https://ai-powered.com/skills/figma-implement-design-mtarcure): Figma implement design is an open-source agent skill for design and media.
- [Figma from code](https://ai-powered.com/skills/figma-from-code): Figma from code is an open-source agent skill for design and media.
- [Figma to code](https://ai-powered.com/skills/figma-to-code-kennedy122112): Figma to code is an open-source agent skill for design and media.
- [Figma to page](https://ai-powered.com/skills/figma-to-page): Figma to page is an open-source agent skill for design and media.
- [Figma to flutter](https://ai-powered.com/skills/figma-to-flutter): Figma to flutter is an open-source agent skill for design and media.
- [Figma build UI](https://ai-powered.com/skills/figma-build-ui): Figma build UI is an open-source agent skill for design and media.

---
Source: https://ai-powered.com/skills/figma-to-react
