Turn a Figma design into shadcn/ui code
Two ways to turn a Figma design built with the shadcn/ui kit into shadcn/ui React code, the Figma plugin and the Figma-to-code agent skill.
To turn a Figma design into shadcn/ui code, build the design with the shadcn/ui kit for Figma and convert it with the Figma to shadcn/ui plugin or with the shadcn-design-figma-to-code agent skill. The plugin generates a component inside Figma, and the skill writes the code into your project from your code editor.
Both routes work best when the design uses the kit's components, variables and text styles.
With the Figma plugin
You need:
- The Figma to shadcn/ui plugin and a license key from the Premium package. You can test it with 15 free uses first.
- An API key from Anthropic, Google AI Studio or v0. The plugin uses AI credits from that account.
Steps:
- Open the plugin in your kit file, open its settings, pick a model and enter your API key. See Generate code for each provider.
- Select the frame or component instance in Figma.
- Click the "+" icon in the plugin to add the desktop variant. Optionally, select the mobile variant and click "+" again.
- In the Your stack row, pick React + shadcn/ui, your component library (Radix UI or Base UI) and your framework.
- Click Build it.
- Click Copy Code, or Copy CLI to get the shadcn/ui CLI command that adds the component to your project.
The plugin gives the best results on single components and smaller parts of a page. See the plugin introduction and Generate code for models, output formats and layer naming.
With the Figma-to-code agent skill
You need:
- The Premium package license key.
- A code editor with an agent, such as Claude Code, Cursor, Codex or OpenCode.
- The Figma MCP server and the shadcn MCP server connected to that agent.
Steps:
-
In your project root, add
SHADCNDESIGN_LICENSE_KEY=your_license_keyto.env.local. -
Add the
@shadcndesignregistry tocomponents.json, as shown in Installation (Premium package). -
Install the skills for your editor. For Claude Code:
npx shadcn@latest add @shadcndesign/skills-claudeFor Cursor, Codex and OpenCode, use
@shadcndesign/skills-cursor,@shadcndesign/skills-codexor@shadcndesign/skills-opencode. -
Give the agent a link to the Figma frame:
/shadcn-design-figma-to-code [link-to-figma-frame]
The skill maps kit components to the shadcn/ui components in your project and installs any Pro Blocks it finds from the registry. It merges the kit's Desktop and Mobile variants into one responsive component. To bring the kit's theme into your globals.css first, run /shadcn-design-import-style [link-to-figma-file]. See Agent Skills.
Which one to pick
Pick the plugin to turn one component or section into code from inside Figma. Pick the skill to build whole screens into an existing project, where the agent reuses your components and installs Pro Blocks.
Bring the design system through Design System Manager
The two routes above convert screens. To move the theme and component styles themselves, connect your agent to Design System Manager over MCP. Figma kit sync pulls values from the shadcndesign kit 3.0 or newer into a system. Figma conversion brings in a design system from another Figma file. You then publish the system and install it with one shadcn CLI command. Neither is offered in Codex. See Figma kit sync and Publish and install.