Giter Club home page Giter Club logo

svg-to-jsx's Introduction

SVG to JSX Figma Plugin

Plugin UI

This plugins does what it says really, gets your SVG code in figma and gives you ready to use JSX you can copy and paste into your react apps and its written in ...๐Ÿฅ๐Ÿฅ VUE ๐Ÿฅ๐Ÿฅ...

Remember kids, the framework wars are not good.

Features:

  • JSX Export
  • React Native export
  • Typescript Export
  • Icon Mode, where all the svg size gets replaced with "1em"
  • Change the Icon name

How to run locally

You will need the figma desktop app you can download here.

Then clone the repo and run:

yarn && yarn start:ui

If you want top change the API you will need to run:

yarn && yarn start

Also uncomment this line and comment the one after it so it uses the dev server and not the deployed one.

Add it to figma by going to "Your Face > Plugins" and clicking on create a new plugin, this will give you the option to link to an existing plugin and you can select the manifest.json in this directory.

Open figma and right click a component and you can access the plugin in Plugins > Development > SVG to JSX.

When making changes go to Menu > Plugins > "Run Last Plugin" (Or hit โŒฅโŒ˜P for Mac or Ctrl+Alt+P for Windows).

Know errors while trying to run locally

LoadRunner.js throwing Error: error:0308010C:digital envelope routines::unsupported

If you get this error, you can solve it by enabling legacy OpenSSL provider.

On Unix-like (Linux, macOS, Git bash, etc.):

export NODE_OPTIONS=--openssl-legacy-provider

On Windows command prompt:

set NODE_OPTIONS=--openssl-legacy-provider

On PowerShell:

$env:NODE_OPTIONS = "--openssl-legacy-provider"

Reference - Stackoverflow

svg-to-jsx's People

Contributors

avocadowastaken avatar dependabot[bot] avatar jb1905 avatar kevinwuhoo avatar neicore avatar saravieira avatar yjose avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.