Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diogoangelim/html-to-jsx
This HTML to JSX library seamlessly transforms HTML strings into JSX syntax, enabling effortless integration of your content within JavaScript frameworks like React.
https://github.com/diogoangelim/html-to-jsx
Last synced: 2 months ago
JSON representation
This HTML to JSX library seamlessly transforms HTML strings into JSX syntax, enabling effortless integration of your content within JavaScript frameworks like React.
- Host: GitHub
- URL: https://github.com/diogoangelim/html-to-jsx
- Owner: DiogoAngelim
- License: mit
- Created: 2024-05-12T12:57:20.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T19:43:15.000Z (3 months ago)
- Last Synced: 2024-10-24T02:11:34.945Z (3 months ago)
- Language: JavaScript
- Size: 123 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.MD
Awesome Lists containing this project
README
### Overview
This HTML to JSX Library provides functions to manipulate and transform HTML strings in JavaScript. It has utilities to wrap HTML content, close self-closing tags, convert event attributes to camel case, convert class attributes to className, remove HTML comments, indent HTML code, convert inline styles to objects, and validate HTML structure.
### Installation
To use the HTML Converter Library in your project, you can install it via npm:
`npm install node-html-to-jsx`
### Usage
Import the library into your JavaScript file:
```JavaScript
import convert from 'node-html-to-jsx';
```Then, you can use the convert function to transform your HTML code:
```JavaScript
const convertedHTML = convert('');Hello, world!
```### Demo
See [DEMO](https://diogoangelim.github.io/html-to-jsx-demo/)
### Note
This library is primarily designed for manipulating HTML strings in JavaScript environments, particularly for use with frameworks like React.
### License
This library is open-source and available under the MIT License.
### Contributions
Contributions to the library are welcome. You can contribute by forking the repository and submitting a pull request with your changes.