Tutorial · 8 min read

How to Convert React Components to Figma Designs

React renders to HTML and CSS, which can be used as the source for best-effort editable Figma layers. This workflow covers React, Storybook, Next.js, and Tailwind output.

HF

HTML to Figma Team

Last reviewed: March 2026

Converting React components to Figma means capturing a rendered React component's DOM output and computed CSS and importing it into native, editable Figma layers. Because React renders to standard HTML, you can copy the rendered output from any running app — Storybook, Next.js, Vite, localhost — via browser DevTools, then paste it into html2design without modifying any source code. The workflow takes approximately 30 seconds per component.

The React-to-Figma Problem

React teams face a workflow gap that gets more expensive the longer it's ignored. Your component library lives in code — a hundred components built up over years, styled with Tailwind or CSS Modules, tested in Storybook. But your design system in Figma is months behind. Designers work from stale mockups. New hires reverse-engineer the app to understand the actual UI.

The obvious fix is to pull the real components into Figma. But React components aren't static files you can drag and drop — they're JavaScript functions that need a browser to render. And most "React to Figma" tools require you to annotate your JSX or add a build plugin, which means touching every component in your codebase.

There's a simpler approach. React already renders to HTML and CSS. You can capture that output from any running React app — no code changes, no plugins, no build step — and convert it to editable Figma layers using html2design. The workflow takes about 30 seconds per component.

Why This Works

When a React component renders, the browser produces a standard HTML DOM with computed CSS styles. At that point, it's just HTML — the same HTML that any other website generates. The html2design Figma plugin processes raw HTML and CSS, mapping the structure and styles to native Figma layers.

This means the approach is framework-agnostic. It doesn't matter whether your app uses Create React App, Vite, Next.js, Remix, or a custom webpack setup. It doesn't care whether you use Tailwind, CSS Modules, styled-components, or plain CSS. What matters is the rendered output — and every React app produces that the same way.

Key insight: You don't need a "React to Figma" plugin. You need an "HTML to Figma" plugin — because that's what React produces. html2design is built exactly for this.

Prerequisites

Step-by-Step: Convert a React Component to Figma

Step 1

Run your React app locally

Start your React development server as you normally would:

# Create React App / Vite npm start # or npx vite # Next.js npm run dev # Storybook npm run storybook

Navigate to the page or component you want to convert. For Storybook, open the specific story in Canvas mode (the isolated story view, not the Docs tab) — this gives you a clean component without the Storybook chrome.

Step 2

Open DevTools and locate the component

Open browser DevTools with Cmd+Option+I (Mac) or F12 (Windows/Linux). Switch to the Elements panel.

Use the element picker (Cmd+Shift+C on Mac) to click directly on the component you want to capture. DevTools will highlight and select the DOM node in the Elements panel.

Navigate up the DOM tree to find the right root element for your component. For a card component, you want the outermost <div> of the card — not a wrapping layout container, and not a deeply nested child.

Step 3

Copy the rendered HTML

In the Elements panel, right-click the root element of your component → Copy → Copy outerHTML.

This copies the fully rendered HTML — with all React-generated class names, inline styles, and data attributes. For a typical React component, this looks like:

<div class="bg-white rounded-xl shadow-sm p-6 flex flex-col gap-4"> <div class="flex items-center gap-3"> <img src="/avatar.jpg" class="w-10 h-10 rounded-full" alt="..." /> <div> <p class="font-semibold text-gray-900">Jane Smith</p> <p class="text-sm text-gray-500">Product Designer</p> </div> </div> <p class="text-gray-700 leading-relaxed">Great tool for bridging design and code.</p> </div>

Notice: Tailwind utility classes are included in the HTML, but what html2design actually reads are the computed styles — the resolved pixel values behind those utilities. You don't need to do anything special for Tailwind to work.

Step 4

Open html2design in Figma

Switch to your Figma file. Open the plugin via Main Menu → Plugins → html2design. The plugin panel appears on the right side of the canvas.

Make sure you're signed in with an active subscription. If you're not subscribed yet, install the plugin from the Figma Community and start a subscription — it takes about two minutes.

Step 5

Paste and convert

Paste the copied HTML into the plugin's input field (Cmd+V on Mac, Ctrl+V on Windows). Click Convert.

The plugin generates a native Figma frame on the canvas with:

Step 6

Clean up and promote to a component

Select the generated frame. Review the layer names in the Layers panel — auto-generated names like div.bg-white.rounded-xl should be renamed to reflect your component vocabulary (TestimonialCard, Avatar, etc.).

When the layers look right, select the root frame and press Cmd+Alt+K (Mac) or Ctrl+Alt+K (Windows) to promote it to a Figma Component. Add variants for different states (hover, selected, disabled) by capturing those states individually and using Figma's Variants panel.

React-Specific Workflows

Converting Storybook stories

Storybook is the ideal source for component-level conversion. Each story renders a component in isolation with specific props — exactly what you want to capture. Open the story in Canvas mode, use the element picker to select the component root, and follow the steps above.

A practical workflow for teams building a design system: work through your Storybook component catalog systematically, converting one story per component variant (default, error, disabled, etc.), then build out the Figma variants from those captures.

Storybook tip: Use the Full Screen view in Storybook (the expand icon in the canvas toolbar) to hide the Storybook frame itself before copying. This gives you a cleaner DOM with fewer wrapper elements to filter out.

For a full walkthrough of the Storybook-specific workflow — including handling the Docs tab, capturing multiple story variants, and building a Figma component library — see the Storybook to Figma use case.

Working with Tailwind CSS

Tailwind compiles to standard CSS at build time. html2design needs access to that generated stylesheet: use a public preview URL, or export a complete HTML document that includes the CSS. Copying only a rendered component's outerHTML keeps utilities such as text-gray-900, p-6, and rounded-xl as class names without embedding their rules.

html2design uses computed visual values rather than utility class names. Tailwind, styled-components, CSS Modules, and vanilla CSS all produce browser CSS, but Figma output still varies with fonts, unsupported effects, assets, and layout complexity.

Capturing different component states

React components often have multiple visual states: a default state, a loading state, an error state, a selected state. Each needs to be captured separately. The workflow for each is the same — trigger the state in the browser (fill in a form, click a toggle, add a query param), then copy the HTML from DevTools.

In Figma, create each state as a separate captured frame, then combine them as Variants under a single Component. This gives you a Figma component library that mirrors your React component API.

Next.js and server-rendered components

Next.js components — both App Router and Pages Router — render to HTML that you can capture in exactly the same way. The fact that a component is server-rendered doesn't matter; by the time you inspect it in DevTools, the browser has received and painted the final HTML. Copy it and paste it into html2design the same way you would for a client-side React component.

What Gets Converted from React Components

html2design accurately converts the vast majority of what React components produce. Here's what to expect:

Component-level beats full-page. Convert one component at a time rather than copying the entire page body. Smaller input produces a cleaner layer tree that's easier to name, organize, and turn into a Figma Component.

Compared to Dedicated React-to-Figma Tools

There are tools specifically marketed as "React to Figma" converters. Most work by parsing your JSX at the source level — reading component files, interpreting props, and generating Figma frames from the code structure rather than the rendered output.

This approach can automatically generate all component variants from a single pass, which is a real advantage at scale. The downside: these tools require you to add annotations or decorators to your components, they often lag behind the latest React patterns, and they struggle with complex CSS-in-JS setups.

The html2design approach is lower friction: no code changes, no annotations, no build pipeline integration. You work from the rendered browser output, which is always accurate regardless of how the component is built. The trade-off is that you capture states manually rather than automatically.

For most teams, the rendered-output approach is practical and fast enough. For teams that need to auto-generate hundreds of variants, a dedicated React introspection tool may be worth the setup cost. See our full comparison of HTML-to-Figma tools for more context.

Building a React Design System in Figma

Once you have a workflow for converting individual components, you can systematically build out a Figma design system that mirrors your React component library. A practical sequencing:

For each component, aim to capture the three or four most important states. Default, hover (captured by triggering the hover state via DevTools' Force element state feature), disabled, and error states cover 90% of what designers need.

Frequently Asked Questions

Can I convert a React component to Figma?

Yes. React renders to HTML and CSS in the browser. You copy that rendered output using DevTools and paste it into the html2design Figma plugin. No special React plugin or code annotation is needed.

Does React to Figma work with localhost?

Yes. html2design works from HTML you paste directly into the plugin — it doesn't need to reach a URL. Your React dev server on localhost:3000 (or any port) works exactly the same as a live URL. See our guide on converting HTML to Figma for the general workflow.

Can I convert Storybook stories to Figma?

Yes. Open the story in Canvas mode, inspect the component, copy its outerHTML, and paste it into html2design. This manual path does not require a public URL. Browser extensions may also capture localhost when the product and browser permissions support it.

Does html2design preserve Tailwind CSS from React components?

Yes, when html2design can access the generated CSS. Import a public preview URL, or provide a complete HTML document with its compiled CSS. Copying an element's outerHTML alone preserves class names but does not embed Tailwind, styled-components, CSS Modules, or other external stylesheets.

What about importing a full React page into Figma?

You can — the workflow is the same. Copy the page's outerHTML (or just the main content area) from DevTools and paste it into html2design. Full pages produce larger, denser layer trees. For design system work, component-level imports are usually more useful. See our guide on importing a website into Figma for full-page strategies.

Key Takeaways


Related Articles

Try it now

Convert your first React component

Open DevTools on your running React app, copy the component's outerHTML, and import supported content as editable Figma layers.

Install from Figma Community →

$12/mo · $96/yr · Cancel anytime

← Back to Blog