免费

HTML转JSX转换器

粘贴HTML获取有效的React JSX。处理className、样式对象、自闭合标签、SVG属性和事件处理器。

100%免费无需注册在浏览器中运行

HTML

JSX (10处更改)

<div className="container">
  <h1 className="title">Hello World</h1>
  <img src="/photo.jpg" alt="Photo" />
  <br />
  <label htmlFor="email">Email</label>
  <input type="email" tabIndex="1" autofocus readonly />
  {/* A comment */}
  <button onClick={handleClick()} style={{{ color: 'red', fontSize: 14 }}}>
    Submit
  </button>
</div>

关于HTML to JSX Converter

Paste HTML and get valid React JSX output instantly. Automatically converts class to className, style strings to objects, self-closing tags, SVG attributes, and event handlers. Saves time when migrating HTML templates to React components.

常见问题

正在构建React应用?LaunchChat的组件只需一个<script>标签——无需JSX。

无需信用卡

Need an AI support chatbot?

LaunchChat turns your docs into a support widget with citations and auto-escalation. Lifetime deal available.

Try Free