What is the SVG to React, Vue & Svelte Converter?
Want to use an SVG icon as a component? Paste the SVG and pick React, Vue or Svelte. You get a ready component with a size prop, and an optional colour prop, and the SVG attributes turned to the right names (class becomes className in React).
Editor leftovers like Inkscape data are removed, fixed width and height are replaced by the size prop, and colours can use currentColor so the icon follows the text colour. Choose TypeScript if you want typed props.
How to use it
- Paste your SVG code, or open an .svg file.
- Pick React, Vue or Svelte, and a component name.
- Copy the component and save it with the file name shown.
Why people like this tool
Three frameworks
React, Vue 3 and Svelte 5.
Size and colour props
Plus all other props are passed on.
TypeScript option
Typed props for TSX and Vue.
Cleans the SVG
Removes editor data and fixed sizes.