Back to Plugins

fig2tw - Convert variables to Tailwind, CSS or JSON
Convert variables into a Tailwind plugin, CSS or JSON
tailwindcsscsstailwindvariablesscopejson
Plugin Preview
About this plugin
Convert Figma variables into a Tailwind plugin, CSS or JSON file.Key features:Tailwind configuration is inferred from the variable scopes.Configure the variable scopes in Figma to generate useful Tailwind configuration.
The background color is given by the variable "color/primary".The text color is given by the variable "color/on primary".The border-radius is given by the variable "radius/sm".The gap is given by the variable "space/md".The padding is given by the variable "space/xs".
All variable modes are converted into CSS variables.Change the mode (light, dark, etc.) with a CSS class.Figma's light mode variables are applied here
Figma's dark mode variables are applied here.
Number units are configured by variable scope.Define how numbers are to converted to CSS. You can choose from px, em, rem. Font weights don't have units.Getting started:1. Download the generated Tailwind pluginDownload the tailwind plugin using the "Download" button and place the file next to your tailwind.config.ts.2. Import the generated plugin in your Tailwind configurationIn the tailwind.config.ts file, import the generated plugin and place it in the plugins array. The configuration should look like below.import fig2tw from "tailwind.fig2tw";const config = {plugins: [fig2tw],// ...}export default config;Supports:Tailwind configuration scopes:colors, fill, accentColor, backgroundColor, gradientColorStops, borderColor, stroke, ringColor, ringOffsetColor, outlineColor, textColor, textDecorationColor, caretColor, placeholderColor, boxShadowColor.spacing, size, width, minWidth, maxWidth, height, minHeight, maxHeight, margin, inset, borderRadius, padding, gap, space, scrollMargin, scrollPadding, borderSpacing, strokeWidth, outlineWidth, borderWidth, ringWidth, fontFamily, fontSize, lineHeight, letterSpacing, fontWeightFigma variables scopes:ALL_SCOPES, ALL_FILLS, FRAME_FILL, SHAPE_FILL, TEXT_FILL, STROKE_COLOR, EFFECT_COLOR, CORNER_RADIUS, WIDTH_HEIGHT, GAP, STROKE_FLOAT, FONT_SIZE, LINE_HEIGHT, LETTER_SPACING, FONT_WEIGHT, FONT_FAMILYPlugin Details
| Version | 8 |
|---|---|
| Created | May 25, 2024 |
| Last Updated | July 8, 2025 |
| Category | Software development |
| Creator | Laurent O'Donoughue |
| Stats | 43 installs, 11 likes |
| Pricing | Free |
Technical Details
- API:1.0.0
- UI:./index.html
- main:./main.js
- Document Access:dynamic-page
- Editor Types:figma
- Allowed Domains:
- https://api-js.mixpanel.com
- https://fonts.gstatic.com
More Like This
Discover other plugins in the Software development category.
Figma to Code (HTML, Tailwind, Flutter, SwiftUI)
Code Conversion Made Easy: Figma to Web & Apps
Builder.io - Figma to Code & AI Apps (React, Vue, Tailwind, etc)
Export designs to clean, responsive code or turn Figma screens into AI apps and prototypes.
SkewDat
Skew any layer or group with all layers preserved to edit.