Export tool for Figma
You can easily and automatically export your figma components
and styles
and use them directly into your website
SVG into .js
data:image/svg+xml
import asES6 from '@figma-export/output-components-as-es6' export default { commands: [ ['components', { fileId: 'fzYhvQpqwhZDUImRz431Qo', onlyFromPages: ['icons'], outputters: [ asES6({ output: './output/es6-dataurl', useDataUrl: true, }) ] }] ] }
Base 64
data:image/svg+xml;base64,
import asES6 from '@figma-export/output-components-as-es6' export default { commands: [ ['components', { fileId: 'fzYhvQpqwhZDUImRz431Qo', onlyFromPages: ['icons'], outputters: [ asES6({ output: './output/es6-base64', useBase64: true, }) ] }] ] }
SVG Sprites
SVG Symbols
<svg><use href="#icon-name" /></svg>
import asSvgstore from '@figma-export/output-components-as-svgstore' export default { commands: [ ['components', { fileId: 'fzYhvQpqwhZDUImRz431Qo', onlyFromPages: ['icons'], outputters: [ asSvgstore({ output: './output/svgstore' }) ] }] ] }
Monochrome SVG Symbols
fill
properties are removed from the svg so you can easily customize the icon color from css.import asSvgstore from '@figma-export/output-components-as-svgstore' export default { commands: [ ['components', { fileId: 'fzYhvQpqwhZDUImRz431Qo', onlyFromPages: ['icons'], outputters: [ asSvgstore({ output: './output/svgstore-monochrome', svgstoreConfig: { cleanSymbols: ['fill'] } }) ] }] ] }
SVG into (p)React Component
React Components
.jsx
files into your project and start using your Figma components as React components.import { Squirrel } from './output/icons/octicons-by-github';
import asSvgr from '@figma-export/output-components-as-svgr' export default { commands: [ ['components', { fileId: 'fzYhvQpqwhZDUImRz431Qo', onlyFromPages: ['icons/octicons-by-github'], outputters: [ asSvgr({ output: './output' }) ] }] ] }
Solid Colors
Linear Gradients
Effects
Text
CSS Variables
css
file.body { color: var(--color-3); background: var(--color-linear-gradient); font-family: var(--regular-text-font-family); font-size: var(--regular-text-font-size); }
import asCss from '@figma-export/output-styles-as-css' export default { commands: [ ['styles', { fileId: 'fzYhvQpqwhZDUImRz431Qo', outputters: [ asCss({ output: './output/css', }) ] }] ] }
Style Dictionary
tokensbase.json
.import asStyleDictionary from '@figma-export/output-styles-as-style-dictionary' export default { commands: [ ['styles', { fileId: 'fzYhvQpqwhZDUImRz431Qo', outputters: [ asStyleDictionary({ output: './output/style-dictionary', }) ] }] ] }
SASS
and SCSS
import asSass from '@figma-export/output-styles-as-sass' export default { commands: [ ['styles', { fileId: 'fzYhvQpqwhZDUImRz431Qo', outputters: [ asSass({ output: './output/scss', }), asSass({ output: './output/sass', getExtension: () => 'SASS', }) ] }] ] }
LESS
import asLess from '@figma-export/output-styles-as-less' export default { commands: [ ['styles', { fileId: 'fzYhvQpqwhZDUImRz431Qo', outputters: [ asLess({ output: './output/less', }) ] }] ] }