This is a command line tool for quickly generate React components from SVG files with customizable attributes (as props). Support for Preact and other component-based frameworks will be made available soon.
npm i -g @helpfulhuman/svg-to-component
svg2react my-graphic.svg
Usage: svg2react [options] <filename>
Options:
-V, --version output the version number
-n, --componentName <n> the desired name for the component
-o, --output <n> the desired filepath for output
-t, --typescript output as a Typescript .tsx file
-h, --help output usage information