DEVtoy
语言 · 简体中文

SVG 转 React 组件

将 SVG 转换为带名称、JSX 属性和 props 的 React 组件。使用前请检查结果。

使用方法

  1. 粘贴输入内容或加载下方示例。
  2. 调整选项后点击“创建组件”。
  3. 检查结果,然后复制或下载。

无需上传,无需账户,处理完全在浏览器内完成。

输入示例
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="icon"><path d="M20 6 9 17l-5-5"/></svg>

相关工具