SVG to React
Convert SVG code to React components. Automatically converts attributes to camelCase and generates TypeScript or JavaScript components.
Features
- TypeScript support
- Auto camelCase conversion
- Props spreading
- Clean component output
- One-click copy
- Preserves SVG structure
How to Use
- 1Paste your SVG code
- 2Set component name
- 3Choose TS or JS
- 4Click Convert
- 5Copy the component
Frequently Asked Questions
What attributes are converted?
All kebab-case attributes like stroke-width become strokeWidth. Class becomes className.
Can I customize the component?
Yes! Props are spread on the SVG element so you can pass className, onClick, etc.