Overview Version History Q & A Rating & Review
FTC - Figma to Code
Create prompts for AI assistants to generate code from Figma designs.
This extension extracts the design data from a Figma file and creates a prompt for an AI assistant to generate code from it. The extension is framework agnostic, so it can be used with any AI assistant in any project. At least in theory.
For support, email me at hello@petrusholm.com.
Setup
Get a Figma Personal Access Token
Go to your Figma Settings
Scroll to "Personal access tokens"
Click "Create a new personal access token"
Give it a name and click "Create token"
Copy the token
For detailed instructions, see the Figma API documentation .
In VS Code: Cmd+Shift+P -> "Figma: Open Settings"
Edit settings you want
Usage
In Figma, select a component or frame
Right-click -> "Copy/Paste as -> Copy link to selection"
In VS Code: Cmd+Shift+P → "Figma: Import Component"
Paste the Figma URL
The prompt is copied to your clipboard and your AI assistant opens
Paste the prompt to generate the component
Requirements
Figma subscription (Free won't do)
AI Assistant of your choice. Built-in support for Claude Code and Cursor, but feel free to paste the output anywhere.
Troubleshooting
"Figma API token not set"
Add your token in VS Code Settings → Extensions → Figma to Code
"Invalid Figma URL"
Ensure you copied the link from a specific component/frame, not the entire file
URL should contain node-id= for best results
Prompt is too large
Select a smaller component or frame in Figma
The extension limits depth to 3 levels to keep prompts manageable
License
See LICENSE.md for license information.