shoonia / jsx-dom-runtime

A tiny in 500 bytes library to JSX syntax templates for DOM. Support HTML, SVG and MathML tags

Home Page:https://shoonia.github.io/jsx-dom-runtime/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jsx-dom-runtime

A tiny in 500 bytes library to JSX syntax templates for DOM. Support HTML, SVG and MathML tags.

test status npm version Stand with Ukraine

Install

npm i jsx-dom-runtime
# or
yarn add jsx-dom-runtime

How to use

Add preset to your .babelrc file.

.babelrc

{
  "presets": [
    "jsx-dom-runtime/babel-preset"
  ]
}

Example

// add to the end of the head
document.head.append(
  <link rel="stylesheet" href="/style.css" />
);

// add to the end the the body
document.body.append(
  <main class="box">
    <h1 class="title">Hello World!</h1>
  </main>
);

Demo

Documentation

License

MIT

About

A tiny in 500 bytes library to JSX syntax templates for DOM. Support HTML, SVG and MathML tags

https://shoonia.github.io/jsx-dom-runtime/

License:MIT License


Languages

Language:TypeScript 98.9%Language:JavaScript 0.7%Language:CSS 0.4%Language:HTML 0.1%