AMOJS · DOCUMENTATION

Build UI with JavaScript.
Compile it to the DOM.

AmoJS is a build-time compiler for fine-grained reactive UI. You write standard .js — signals and tagged templates — and it compiles to the vanilla JavaScript you would have written: one cloned template, one targeted update per hole, no virtual DOM. The same source also runs in the browser with no build at all; the compiler is an optimizer, not a requirement.

terminal
$ npm create amojs my-app
$ cd my-app
$ npm install
$ npm run dev

Try it

A complete AmoJS island. The button on the right is running live — one signal, one binding, one element. The code on the left is the file that renders it, read at build time.

src/islands/counter.ts
import { signal, html, mount } from '@amojs.dev/core';

const count = signal(0);

const Counter = () =>
  html`<button class="counter" onclick=${() => count.value++}>clicked ${count} times</button>`;

const host = document.getElementById('demo');
if (host) mount(Counter, host);
live preview● running

Numbers

Measurements, not marketing. Every figure is enforced by a test in the repository.

1.98 KB
compiled application, all-in, min+gzip
0
runtime dependencies
12
API names, total
1.090×
compiled vs. handwritten vanilla

Explore