Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shoonia/jsx-dom-runtime
A tiny in 500 bytes library to JSX syntax templates for DOM. Support HTML, SVG and MathML tags
https://github.com/shoonia/jsx-dom-runtime
babel-plugin jsx jsx-dom jsx-syntax jsx-templates
Last synced: 5 days ago
JSON representation
A tiny in 500 bytes library to JSX syntax templates for DOM. Support HTML, SVG and MathML tags
- Host: GitHub
- URL: https://github.com/shoonia/jsx-dom-runtime
- Owner: shoonia
- License: mit
- Created: 2021-03-06T10:03:32.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-27T10:40:15.000Z (6 months ago)
- Last Synced: 2024-05-28T22:29:07.225Z (6 months ago)
- Topics: babel-plugin, jsx, jsx-dom, jsx-syntax, jsx-templates
- Language: TypeScript
- Homepage: https://shoonia.github.io/jsx-dom-runtime/
- Size: 4.84 MB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsx-dom-runtime
A tiny in 500 bytes library to [JSX](https://facebook.github.io/jsx/) syntax templates for [DOM](https://dom.spec.whatwg.org/). Support [HTML](https://html.spec.whatwg.org/multipage/), [SVG](https://www.w3.org/TR/SVG/) and [MathML](https://www.w3.org/TR/MathML3/) tags.
[![npm version](https://badgen.net/npm/v/jsx-dom-runtime)](https://www.npmjs.com/package/jsx-dom-runtime)
[![Stand with Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua/)## Install
```bash
npm i jsx-dom-runtime
# or
yarn add jsx-dom-runtime
```## How to use
Add preset to your [`.babelrc`](https://babeljs.io/docs/en/config-files) file.
**.babelrc**
```json
{
"presets": [
"jsx-dom-runtime/babel-preset"
]
}
```## Example
```js
// add to the end of the head
document.head.append(
);// add to the end the the body
document.body.append(
Hello World!
);
```[Demo](https://github.com/shoonia/jsx-dom-runtime/tree/master/DEMO)
## Documentation
- [Get Started](https://github.com/shoonia/jsx-dom-runtime/wiki#jsx-dom-runtime)
- [Syntax](https://github.com/shoonia/jsx-dom-runtime/wiki#syntax)
- [APIs](https://github.com/shoonia/jsx-dom-runtime/wiki#apis)
- [TypeScript Support](https://github.com/shoonia/jsx-dom-runtime/wiki#typescript-support)## License
[MIT](https://github.com/shoonia/jsx-dom-runtime/blob/master/LICENSE)