sketch-svg-to-react-component

Sketch plugin to compress SVG and transform it to React (include React Native) components. By copy React component directly to you clipboard or export as files.

Usage no npm install needed!

<script type="module">
  import sketchSvgToReactComponent from 'https://cdn.skypack.dev/sketch-svg-to-react-component';
</script>

README

sketch-svg-to-react-component

The sketch plugin which can transform svg to react or react native svg component.

Usage

  • Copy sketch selected layers as React Component: cmd + option + r
  • Copy sketch selected layers as RN Component: cmd + option + n
  • Export multiple svg as React Component

Upcoming soon:

  • Export multiple svg as RN Component
  • Simplify svg

Todo:

  • format copied string by prettier
  • reduce packages size by using like sketch/dom sketch/UI
  • remove specific characters in filename like @2x, otherwise will cause error
  • export simplify svgs
  • add outline for svg
  • export react components with customized template