Back to Plugins
SVG to Vue.js component

SVG to Vue.js component

<p>Convert selected frames to .vue files with common props. Best for icons, logos and illustrations. </p><p><br></p><h2>How to use</h2><ol><li>Select frames</li><li>Run plugin</li><li>Customize export options</li><li>Click «Download»</li><li>Copy files to your project</li><li>Use in your project <code>&lt;FrameName size="24px" style="color: black" /&gt;</code></li></ol><p><br></p><h2>Component props</h2><p><code>size: String</code> <em>optional</em></p><p><code>width: String</code> <em>optional</em></p><p><code>height: String</code> <em>optional</em> </p><p><code>&lt;FrameIcon size="24px" /&gt;</code></p><p><code>&lt;FrameIcon width="24px" /&gt;</code></p><p><code>&lt;FrameIcon height="24px" /&gt;</code></p><p><br></p><h2>Export options</h2><p><strong>‘.fill-current-color’ instead of grayscale fill</strong></p><p><strong>‘.stroke-current-color’ instead of grayscale stroke</strong></p><p>Removes grayscale fill/stroke and adds class to the node. Only works if all fills/strokes in the frame are grayscale (if frame has a saturated fill/stroke color the entire frame will be ignored). Best for icons. Don't forget add css rules:</p><p><code>.fill-current-color { fill: currentColor }</code></p><p><code>.stroke-current-color { stroke: currentColor }</code></p><p><br></p><p><strong>Remove masks</strong></p><p>Removes all &lt;mask&gt; nodes</p><p><br></p><p><strong>Remove frame clipPath</strong></p><p>Sets overflow="visible" and removes clip-path. Useful when you want to keep the size of the frame, but there are elements that go beyond its borders. For example elements with a shadow</p><p><br></p><p><a rel="noreferrer noopener nofollow ugc" href="https://github.com/plonke/figma-svg-to-components" target="_blank">Github</a></p><p><br></p>

Plugin Preview

SVG to Vue.js component preview

About this plugin

Convert selected frames to .vue files with common props. Best for icons, logos and illustrations.


How to use

  1. Select frames
  2. Run plugin
  3. Customize export options
  4. Click «Download»
  5. Copy files to your project
  6. Use in your project <FrameName size="24px" style="color: black" />


Component props

size: String optional

width: String optional

height: String optional

<FrameIcon size="24px" />

<FrameIcon width="24px" />

<FrameIcon height="24px" />


Export options

‘.fill-current-color’ instead of grayscale fill

‘.stroke-current-color’ instead of grayscale stroke

Removes grayscale fill/stroke and adds class to the node. Only works if all fills/strokes in the frame are grayscale (if frame has a saturated fill/stroke color the entire frame will be ignored). Best for icons. Don't forget add css rules:

.fill-current-color { fill: currentColor }

.stroke-current-color { stroke: currentColor }


Remove masks

Removes all <mask> nodes


Remove frame clipPath

Sets overflow="visible" and removes clip-path. Useful when you want to keep the size of the frame, but there are elements that go beyond its borders. For example elements with a shadow


Github


Plugin Details

Version3
CreatedNovember 21, 2022
Last UpdatedNovember 23, 2022
CategoryUncategorized
CreatorPavel Plonke
Stats81 installs, 12 likes
PricingFree

Technical Details

  • API:1.0.0
  • UI:ui.html
  • main:plugin.js
  • Editor Types:
    figma

More Like This

Discover other plugins in the same category.

No similar plugins found in this category.