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.
- Download and unzip
- Double-click the plugin.sketchplugin file
- In Sketch, select the layers to copy
- Hit Option ⌥+Command ⌘+R or go to Plugins -> Copy as Copy Component
- A React component is now copied to your clipboard!
How does it work?
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!
- Add props for fill & stroke colors
- Add an option to copy a full React.Component class