Skip to main content

SVG to React

v1.0.0

Convert raw SVG markup to React/JSX components with proper attribute conversion

Converts raw SVG markup into a ready-to-use React component by transforming HTML/SVG attributes to their JSX equivalents and removing namespace attributes.

How to use
  • Paste SVG source from Figma, icon libraries, or any SVG editor.
  • Set the component name and choose TypeScript or JavaScript output.
  • Enable props spreading to allow consuming code to override SVG attributes.
  • Optionally wrap the component in React.memo for render optimisation.