fig2tw - Convert variables to Tailwind, CSS or JSON
by Laurent O'Donoughue
Convert variables into a Tailwind plugin, CSS or JSON
FreeFigma
Installs
52
Likes
13
Users
945
Views
1,954
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 hereFigma'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_FAMILY
More software development plugins
View allBuilder.io - Figma to Code & AI Apps (React, Vue, Tailwind, etc)
by Steve Sewell
Export designs to clean, responsive code or turn Figma screens into AI apps and prototypes.
410.3K 23.4K
Anima: Convert Figma to HTML/CSS/React/Tailwind,Vibe code,DevMode Inspect/Run React/HTML,App builder
by Anima
Anima - AI Design to code, Vibe code, Vibe design
400.6K 17.8K
SkewDat
Paidby Unfold
Skew any layer or group with all layers preserved to edit.
276K 7.3K
Zeplin
Paidby Zeplin Crew
Design tools are for designing. Zeplin is for clear, structured design delivery.
183.3K 2.9K