Convert HTML markup to valid JSX for React. Automatically handles className, htmlFor, self-closing tags, and inline styles.
| HTML | JSX | Note |
|---|---|---|
| class="…" | className="…" | Reserved word in JS |
| for="…" | htmlFor="…" | Reserved word in JS |
| tabindex="…" | tabIndex="…" | camelCase |
| maxlength="…" | maxLength="…" | camelCase |
| minlength="…" | minLength="…" | camelCase |
| readonly | readOnly | camelCase |
| colspan="…" | colSpan="…" | camelCase |
| rowspan="…" | rowSpan="…" | camelCase |
| crossorigin="…" | crossOrigin="…" | camelCase |
| style="color:red" | style={{'{'}}{'{'}color:'red'{'}'}{'}'} | Object syntax |
| <br> | <br /> | Self-closing void elements |
| <!-- comment --> | {'{'}/* comment */{'}'} | JSX comment syntax |