Skip to content

jasondonnette/sketch-copy-as-react-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Generate a React components from Sketch with a keyboard shortcut

Resources

License

Stars

Watchers

Forks

Packages

No packages published