npm.io
0.81.0 • Published 15h ago

jsx-dom-runtime

Licence
MIT
Version
0.81.0
Deps
1
Size
186 kB
Vulns
0
Weekly
0
Stars
15

jsx-dom-runtime

A tiny 500-byte library for JSX syntax templates targeting the DOM. Supports HTML, SVG, and MathML tags.

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

Getting Started
Syntax & Features
API Reference
Tooling

License

MIT

Keywords