Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Svg to JSXNew to Visual Studio Code? Get it now.
Svg to JSX

Svg to JSX

Prabal Saxena

|
941 installs
| (1) | Free
It converts your svg file to valid jsx
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Svg to JSX

Simple extension to convert your svg file to react component

Features

  • converts svg syntax to valid jsx by replacing invalid svg attribute to valid jsx attribute for ex. inner-width -> innerWidth
  • converts style to valid jsx style object
  • change file extension from svg to .js
  • you can choose the file type between .js and .ts - Upcomming
  • Always Capitalize first letter of component name to make it valid react component.

how to use

  1. Hit cmd+shift+p in mac or ctl+shift+p in windows or linux to open command palette.
  2. Type svgToReact, select svgToJsx: convert this svg to react component once it appears.
  3. Tada! your react component is ready!

Release Notes

Users appreciate release notes as you update your extension.

1.0.1

  • fixed wrong naming issue in window os and linux.
  • added full attribute support.

Say Hi!, send suggestion or report a bug

You can contact me at prabalsaxena2@gmail.com Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft