@nithish_atum/svg2react
v1.0.2
Published
CLI: convert SVG files to React icon components (jsx/tsx) with SVGO + SVGR
Readme
svg-to-react-icon
A simple CLI + API tool to convert SVG files into ready-to-use React functional components.
Useful for creating your own icon library from raw SVG assets without manually wrapping them.
✨ Features
- 🛠 Convert any
.svgfile to a React component. - ⚡ Batch process multiple SVGs at once.
- 🎯 Outputs tree-shakable ES modules.
- 💡 Supports custom component name formatting.
- 📦 Works in Vite, CRA, Next.js, etc.
📦 Installation
npm install -g svg-to-react-icon
# or
yarn global add svg-to-react-icon