A Figma plugin to easily apply CSS styles to your objects, layers and frames
CSS Property | Figma Property | Supported Values | Status |
---|---|---|---|
color |
textNode.fill |
All color types | π’ Stable |
background-color |
node.fills |
All color types | π’ Stable |
background-image |
node.fills |
Linear and radial gradients only | π‘ Beta |
border |
strokes , strokeWeight , dashPattern |
All color types - Pixel values - Solid, dashed and dotted | π Alpha |
border-top-width |
strokeWeight |
Pixel values | π Alpha |
border-right-width |
strokeWeight |
Pixel values | π Alpha |
border-bottom-width |
strokeWeight |
Pixel values | π Alpha |
border-left-width |
strokeWeight |
Pixel values | π Alpha |
border-top-color |
strokes |
All color types | π’ Stable |
border-right-color |
strokes |
All color types | π’ Stable |
border-bottom-color |
strokes |
All color types | π’ Stable |
border-left-color |
strokes |
All color types | π’ Stable |
border-color |
strokes |
All color types | π’ Stable |
border-width |
strokeWeight |
Pixel values | π’ Stable |
border-style |
dashPattern |
Solid, dashed and dotted | π’ Stable |
border-radius |
topLeftRadius , topRightRadius , bottomRightRadius , bottomLeftRadius |
Pixel values | π’ Stable |
border-top-left-radius |
topLeftRadius |
Pixel values | π’ Stable |
border-top-right-radius |
topRightRadius |
Pixel values | π’ Stable |
border-bottom-left-radius |
bottomRightRadius |
Pixel values | π’ Stable |
border-bottom-right-radius |
bottomLeftRadius |
Pixel values | π’ Stable |
box-shadow |
node.effects |
All formats of inner shadows and drop shadows | π’ Stable |
text-shadow |
node.effects |
All drop shadow formats | π’ Stable |
background-blend-mode |
node.blendMode |
All blend modes | π’ Stable |
mix-blend-mode |
node.blendMode |
All blend modes | π’ Stable |
text-decoration |
node.textDecoration |
Underline, strikethrough, none | π’ Stable |
display |
node.layoutMode |
Autolayout horizontal | π’ Stable |
text-transform |
textNode.textCase |
Uppercase, lowercase, title, original | π’ Stable |
flex-direction |
node.layoutMode |
row , column |
π’ Stable |
justify-content |
node.primaryAxisAlignItems |
flex-start , flex-end , center , space-between |
π‘ Beta |
align-items |
node.counterAxisAlignItems |
flex-start , flex-end , center |
π‘ Beta |
flex-wrap |
node.layoutWrap |
nowrap , `wrap1 |
π’ Stable |
flex-grow |
node.layoutGrow |
Numbers | π’ Stable |
gap |
node.itemSpacing |
Numbers | π’ Stable |
padding |
node.paddingTop , node.paddingRight , node.paddingBottom , node.paddingLeft |
One, two, three or four sets of numbered values | π‘ Beta |
padding-top |
node.paddingTop |
One set of numbered values | π‘ Beta |
padding-right |
node.paddingRight |
One set of numbered values | π‘ Beta |
padding-bottom |
node.paddingBottom |
One set of numbered values | π‘ Beta |
padding-left |
node.paddingLeft |
One set of numbered values | π‘ Beta |
filter |
node.effects |
Blur only (layer blur) | π’ Stable |
backdrop-filter |
node.effects |
Blur only (background blur) | π’ Stable |
rotate |
node.rotation |
Deg only | π‘ Beta |
opacity |
node.opacity |
0 -> 1 values | π’ Stable |
overflow |
node.clipsContent |
hidden |
π’ Stable |
overflow-y |
node.clipsContent |
hidden (affects x and y) |
π’ Stable |
overflow-x |
node.clipsContent |
hidden (affects x and y) |
π’ Stable |
width |
node.resize |
All color types | π’ Stable |
height |
node.resize |
All color types | π’ Stable |
text-overflow |
- | Truncate when ellipsis |
βͺ Todo |
text-clip |
- | Text-based gradients | βͺ Todo |
ul |
- | List | βͺ Todo |
ol |
- | List | βͺ Todo |
text-align |
- | Text alignment | βͺ Todo |
letter-spacing |
- | Letter spacing | βͺ Todo |
line-height |
- | Line height | βͺ Todo |
font-style |
- | Font style | βͺ Todo |
font-size |
- | Font size | βͺ Todo |
font-weight |
- | Font weight | βͺ Todo |
font-family |
- | Font family | βͺ Todo |
This plugin is built with Create Figma Plugin.
- Node.js β v20
- Figma desktop app
To build the plugin:
$ npm run build
This will generate a manifest.json
file and a build/
directory containing the JavaScript bundle(s) for the plugin.
To watch for code changes and rebuild the plugin automatically:
$ npm run watch
- In the Figma desktop app, open a Figma document.
- Search for and run
Import plugin from manifestβ¦
via the Quick Actions search bar. - Select the
manifest.json
file that was generated by thebuild
script.
Use console.log
statements to inspect values in your code.
To open the developer console, search for and run Show/Hide Console
via the Quick Actions search bar.
Official docs and code samples from Figma: