⚡Lightweight CLI utility tool for converting Adobe Illustrator's .svg export files into formatted React .jsx components.
Motivation: I spent an hour building a tool to avoid spending 3 minutes per SVG doing it manually.
Important
This project only supports Adobe Illustrator's svg exports.
Usage: svg-to-jsx [options] [command]
┌────── svg-to-jsx ──────┐
│ Convert .svg --> .jsx │
└────────────────────────┘
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
convert [options] <input> Convert Illustrator .svg to React component
help [command] display help for command
- ⚡️ Command line interface - Commander
- 🍿 Colored UI - Chalk
- ✨ Unit testing - Vitest
- 💾 Save to Clipboard or File
- Deconstruct the raw SVG file into individual objects using RegEx
- Build a React component out of the deconstructed SVG objects
- Format the new React component using Prettier
- ✨ Your SVG is ready to be used within your React app
Made with ❤️ by Kaspar