Generate a React components from Sketch with a keyboard shortcut
Clone or download
Jason Donnette
Jason Donnette Update LICENSE
Latest commit c4610eb Jun 28, 2018

README.md

Copy as React Component - Sketch Plugin

Copy as React Component is a Sketch plugin that allows you to generate a React components with a keyboard shortcut.

Installation

  1. Download and unzip
  2. Double-click the plugin.sketchplugin file

Instructions

  1. In Sketch, select the layers to copy
  2. Hit Option ⌥+Command ⌘+R or go to Plugins -> Copy as Copy Component
  3. A React component is now copied to your clipboard!

How does it work?

demo

Copy as React Component uses the same output from Right-Click > Copy SVG Code, then transforms it into JSX and prettifies it with Prettier.

That's pretty much it!

Roadmap

  • Add props for fill & stroke colors
  • Add an option to copy a full React.Component class