Use Case · Tailwind CSS + React

Last reviewed: March 2026

Tailwind + React to Figma —
In Two Minutes

Converting Tailwind CSS and React components to Figma works because the browser resolves every utility class — text-blue-600, rounded-xl, gap-4 — into computed CSS. Paste the rendered HTML into the html2design plugin and get native, editable Figma layers with exact spacing, colors, and typography.

What is "Tailwind + React to Figma"?

"Tailwind + React to Figma" describes the workflow of converting a React component styled with Tailwind CSS into a native Figma design. The key insight is that Tailwind utility classes are compiled to real CSS and applied by the browser — the html2design plugin reads the computed result, not the class names. So bg-blue-600 becomes the actual hex value #2563EB in Figma.

This works for any React + Tailwind setup: Create React App, Next.js, Vite, Remix, or any other bundler. It also works with Tailwind component libraries like shadcn/ui, Headless UI, and Radix UI — because the browser resolves all their styles before you copy the HTML.

The Tailwind + React to Figma workflow

Four steps, under two minutes. Works with any React + Tailwind stack and any Tailwind component library.

Step 01

Run your React app locally

Start your development server with npm run dev (Vite or Next.js), npm start (CRA), or npm run dev (Remix). Navigate to the page or component you want to capture.

If the component depends on React state or props, set the desired state first — fill in a form, toggle open a dropdown, switch between light and dark themes. The plugin captures whatever the browser renders.

Step 02

Copy the rendered HTML from DevTools

Open DevTools (F12). In the Elements panel, find the root element of your Tailwind component — look for the element with your Tailwind utility classes applied. Right-click it and choose Copy > Copy outerHTML.

For a full-page export, right-click on the <main> or the top-level layout container and copy its outerHTML. The Tailwind classes you see in the HTML source are already resolved to computed CSS — the browser has done the translation.

Step 03

Paste into html2design and generate

Open Figma, run the HTML to Figma plugin, paste the copied HTML, and click Generate. The plugin parses the HTML and reads the computed styles — your Tailwind config's custom colors, spacing scale, and border radii are all resolved by the browser before the plugin reads them.

A button with bg-blue-600 text-white rounded-lg px-4 py-2 becomes a Figma frame with a #2563EB fill, white text, 8px border radius, and exact padding — native Figma objects, not a screenshot.

Step 04

Share the Figma frame with your designer

Share the Figma link. Your designer can annotate, adjust spacing, iterate on the design, and return a Figma-native spec. Because the frame started from the actual rendered component, every change the designer proposes is a true design delta — not a guess about what the current state looks like.

This workflow eliminates the "does your Figma match what's in production?" question. It does — because you just exported the live component.

Tailwind-specific tips for better Figma output

Tailwind's utility-first approach pairs especially well with HTML to Figma. These tips help you get pixel-perfect imports.

Tailwind classes are invisible to the plugin — computed values are not

The html2design plugin never sees Tailwind class names like text-blue-600 or p-4. It reads the computed CSS the browser already calculated — the final pixel and hex values. Custom themes, extended color palettes, and spacing overrides in tailwind.config.js all resolve correctly because the browser handles the resolution, not the plugin.

Capture responsive layouts at the viewport you want

Tailwind's responsive modifiers (md:, lg:, xl:) apply at specific breakpoints. The browser applies the correct styles for the current viewport width. Use DevTools responsive mode to resize to exactly 375px for mobile, 768px for tablet, or 1280px for desktop — then copy the outerHTML. Each captures the appropriate responsive state.

Dark mode: switch before copying

If your Tailwind setup uses the dark: variant, the dark mode styles are only applied when dark mode is active. Toggle your app to dark mode (or add the dark class to the <html> element in DevTools), then copy the HTML. Import the dark mode version as a separate Figma frame alongside the light mode frame.

shadcn/ui and Headless UI components work out of the box

shadcn/ui, Headless UI, and Radix UI components use CSS custom properties for theming alongside Tailwind utility classes. Both are resolved by the browser. Render the component in the desired state — a dialog open, a dropdown expanded, a toast visible — then copy the outerHTML. The plugin reads the fully resolved styles, including the Radix UI data-state attributes and their CSS consequences.

What you get in Figma

Every import creates native Figma objects — not screenshots, not plugin wrappers.

Exact Tailwind theme colors

Custom colors from your tailwind.config.js — brand primaries, neutral scales, semantic tokens — are resolved by the browser and appear as exact hex fills in Figma.

Pixel-perfect spacing

Tailwind's spacing scale (p-4 = 16px, gap-6 = 24px) appears as exact pixel values in Figma. Consistent with your design system spacing.

Border radii from your config

Tailwind's border radius utilities — including custom borderRadius extensions — translate to exact corner radius values on Figma frames.

Typography at correct scale

Font sizes (text-sm, text-2xl), line heights, font weights, and letter spacing from Tailwind's type scale appear as correct Figma text properties.

Frequently asked questions

How do I convert a Tailwind CSS component to Figma?

Run your React app, open the component in the browser, copy the root element's outerHTML from DevTools, and paste it into the html2design Figma plugin. The browser has already resolved every Tailwind utility class to its computed value — those values land in Figma as native fills, spacing, and text properties.

Does Tailwind CSS work with the html2design plugin?

Yes, Tailwind CSS works perfectly. The plugin reads computed CSS, not utility class names. Custom themes, extended palettes, and spacing overrides all resolve correctly.

Can I convert a shadcn/ui component to Figma?

Yes. Render the shadcn component in the desired state, copy the outerHTML from DevTools, and paste into html2design. All Tailwind utility classes and CSS custom property tokens resolve correctly.

Will my custom Tailwind theme colors be accurate?

Yes. Custom colors defined in tailwind.config.js are resolved by the browser to their final hex values. Whatever color the browser displays is exactly what lands in Figma.

Which responsive breakpoint does Figma get?

Figma gets the styles applied at your browser's current viewport width. Use DevTools responsive mode to set exactly the viewport size you want before copying the HTML.

Related Guides

Convert your Tailwind components to Figma today

Install html2design from the Figma Community — free to try, works with any Tailwind stack, no Chrome extension needed.

Install Free on Figma Community

Free to try · $12/mo to unlock all features