Loading Byte-Kit
Preparing browser tools...
Loading Byte-Kit
Preparing browser tools...
Turn SVG markup into a typed TypeScript React component or Vue SFC.
The SVG to React Component tool turns raw SVG markup into a typed TypeScript React component or a Vue single-file component. It rewrites SVG attributes to their JSX equivalents — class becomes className, stroke-width becomes strokeWidth — and optionally strips width and height so the icon sizes through props.
Inlining SVGs as components beats <img> tags for icons: they inherit currentColor, accept props, tree-shake with the rest of your code, and never trigger an extra HTTP request. Paste an export from Figma or Illustrator and get a component you can drop straight into a codebase.
JSX doesn't allow hyphenated attribute names, so SVG's stroke-width must become strokeWidth and class must become className. The converter applies the standard mapping automatically, including xlink attributes.