The workflow in short
Handoff used to mean specs, redlines and a developer rebuilding a design by eye. With shadcn/ui Pro, design and code start from the same parts, so turning a frame into code is mostly a matter of mapping names. A Figma kit component becomes the shadcn/ui component of the same name, and a block from the kit becomes the same block, installed from the registry.
Your AI editor does the mapping with the /shadcnpro-generate-code Agent Skill, in Claude Code, Cursor, Codex or OpenCode.
1. Design with the Figma kit
The Figma kit mirrors shadcn/ui one-to-one. Components carry their shadcn/ui names, so a Dialog in Figma is <Dialog> in code. Variables carry the CSS variable names, so primary in Figma is --primary in your stylesheet. And every block in the kit is a block on the Blocks page, with the same layout in both.
2. Set up the project once
- A shadcn/ui project, which means a
components.jsonfile at its root. Runnpx shadcn@latest initif you don't have one. - The shadcn/ui Pro registry, connected with your license key as described in Installation, so blocks can be installed.
- The Agent Skills, installed with one command from Agent Skills setup.
- The MCP servers the skill uses: Figma's own MCP server to read frames, and the shadcn/ui Pro MCP server to find matching blocks. The official shadcn MCP server is optional.
3. Generate the code
In Figma, right-click the frame and choose Copy link to selection. Then run the skill in your editor's chat with that link, for example /shadcnpro-generate-code https://figma.com/design/abc123/MyApp?node-id=42-15. The skill then:
- Reads your project: the framework, the UI library, the icon library and the components you have.
- Reads the frame's layout, variables and a screenshot through the Figma MCP server.
- Installs the blocks the frame uses from the registry, instead of rebuilding them.
- Maps every other element to a shadcn/ui component, and installs the ones you don't have yet.
- Imports icons from your project's icon library and saves images to
public/. - Checks types and lint and, when your editor has a browser tool, compares the result with the screenshot and fixes what doesn't match.
4. Bring the theme across
Run /shadcnpro-import-variables with a link to your Figma file, such as your copy of the kit, and pick the style or brand mode to import. It writes the variables into your global stylesheet: colors for light and dark mode, radius and fonts, in the color format your stylesheet already uses. Because the kit's variables share their names with the CSS variables, the theme means the same thing on both sides.
5. Review and refine
The result is a .tsx file that uses your components and your theme, with no runtime dependency to keep in sync. Ask for changes in the same chat, for example “make the cards stack on mobile”, and edit the file like any other code. For a large page, run the skill on one section at a time for more control.
Tips for better results
- Name your layers. “PricingSection” tells the agent more than “Frame 47”.
- Use auto layout. It becomes flexbox, so the code resizes the way your design does.
- Use variables for colors and spacing. They become your CSS variables instead of hard-coded values.
- Start from the kit. Files built with the Figma kit map one-to-one to shadcn/ui and to blocks.
