Token -> Code
by ziven27
The plugin read elements you select and let you export them into Html with SACSS.If the element with Auto layout it goes to flex.* SACSS「 Static Atomic css 」:…
FreeFigma
Installs
3,413
Likes
48
Users
3,930
Views
6,932
Preview
About this plugin
The plugin read elements you select and let you export them into Html with SACSS.If the element with Auto layout it goes to flex.* SACSS「 Static Atomic css 」: Each css selector with only one css rules.Five Tabs:HTML: Elements => HTML;CSS: Element Style => CSS;Token: get Base Token Info;Config: Config the whole project;Help: for help;There are 2 way to use Token to code.1. Pure way:This way you need config nothing.Just open plugin and select the element. The element will transform to the Static Atomic CSS like below.font-size: .fs12{ font-size: 12px; };font-weight:.fw700{ font-weight: 700; };font-style:fsi{ font-style: italic; };line-height:.lh16{ line-height: 16px; };text-align:tac{ text-align: center; };text-transform:.ttc{ text-transform: capitalize; };padding: .pb16{ padding-bottom:16px; }flex: .df{ display:flex; }...you need `$ npm install sacss` first.https://www.npmjs.com/package/sacssAll style in SACSS will ignore.Wanna known more about SACSS?https://s-acss.github.io/2. Custom way:You can custom each token through the figma token id.When the generator match the rules, it will turn out to be the code as you custom.The other stuff you don't give alias will use SACSS instead.2.1 Custom Base node{
"tokens": {
[id]: {
"_tokenName": "effet1",
"_tokenType": "EFFECT",
"DEFAULT": {
"className": ["g_shadow1"],
"_ignoreClassName": []
}
}
}
}
this will output the node with `g_shadow` class2.1 Custom depend the node type{
"tokens": {
[id]: {
"_tokenName": "figma node name",
"_tokenType": "COMPONENT",
"DEFAULT": {
"type": "primary",
"size": "large",
"tagName": "Button",
"className": [],
"children": true,
"_ignoreClassName": [],
"_renderHeight": true,
"_renderWidth": true
}
}
}
}
it will render like :`button`Component will ignore Height and Width default, if you wanna it you can set renderHeight add `_renderWidth` to be trueTokenfilltexteffectstrokegrideffectcomponentpaddingflexAnything can turn out to be code is calling Token.FAG1. I can't open the plugin of SACSS in the first time?Try 3 times and wait.2. How to ignore some element?Just set those element name with `_` start.exp: `_header`
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