# 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.

Canonical: https://www.shadcndesign.com/docs/figma-to-shadcn-ui-code

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](https://www.figma.com/community/plugin/1427238109341529865/figma-to-shadcn-ui) and a license key from the [Premium](/figma-kit#pricing) 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:

1. Open the plugin in your kit file, open its settings, pick a model and enter your API key. See [Generate code](/docs/generating-code#anthropic-ai) for each provider.
2. Select the frame or component instance in Figma.
3. Click the "+" icon in the plugin to add the desktop variant. Optionally, select the mobile variant and click "+" again.
4. In the **Your stack** row, pick **React + shadcn/ui**, your component library (Radix UI or Base UI) and your framework.
5. Click **Build it**.
6. 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](/docs/plugin) and [Generate code](/docs/generating-code) for models, output formats and layer naming.

## With the Figma-to-code agent skill

You need:

- The [Premium](/figma-kit#pricing) 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:

1. In your project root, add `SHADCNDESIGN_LICENSE_KEY=your_license_key` to `.env.local`.
2. Add the `@shadcndesign` registry to `components.json`, as shown in [Installation (Premium package)](/docs/agent-skills#installation-premium-package).
3. Install the skills for your editor. For Claude Code:

   ```bash
   npx shadcn@latest add @shadcndesign/skills-claude
   ```

   For Cursor, Codex and OpenCode, use `@shadcndesign/skills-cursor`, `@shadcndesign/skills-codex` or `@shadcndesign/skills-opencode`.

4. Give the agent a link to the Figma frame:

   ```bash
   /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](/docs/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](/docs/ds-manager-mcp#figma-kit-sync) and [Publish and install](/docs/ds-manager-publish).
