免费
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.
常见问题
更多Developer工具
Converting HTML to React? LaunchChat's widget embeds seamlessly in any React or Next.js app.
Free tier available. No credit card required.