svgin-react 0.9.1

Try svgin-react

svgin-react fetches an SVG from a URL (or takes raw markup directly) and renders it as a real, styleable React element instead of an <img>. It sanitizes the SVG by default, so it is safe to use with an SVG you did not create yourself, and it works both in the browser and in React Server Components.

This site is installed as a real dependency from npm, not imported from the library's source, so every demo below reflects exactly what a real install gives you.