Zero-dependencies reactive UI runtime
DOM-first. AI-ready. No framework.
See also: Philosophy
signal, computed, effect, and batchh, tag, createTags, and dynamic tags proxyShow and keyed Formount and enhanceztools.ssr.js and renderToStringdefineComponent (wc.js)ztools.client.full.js ≈ 16.3 KB, ztools.ssr.full.js ≈ 2.9 KB — honest raw size, uncompressed, not minified)npm install @ztools.org/runtime
Copy this into index.html and open it in a browser:
<!doctype html>
<html>
<body>
<div id="app"></div>
<script type="module">
import { signal, computed, tags, mount } from "https://ztools.org/dist/ztools.client.full.js";
const { div, p, button } = tags;
function App() {
const count = signal(0);
const doubled = computed(() => count() * 2);
return div(
p("count: ", () => count(), " x2=", () => doubled()),
button({ onClick: () => count.set(count() + 1) }, "+1")
);
}
mount(App, document.getElementById("app"));
</script>
</body>
</html>
For a full project setup walkthrough, see Getting Started.
signal, effect, computed, batch, onCleanuph, tag, tags (plus createTags when you prefer explicit tag lists)Show (alias: If), Formount, enhanceSee full API reference: API
Examples are published here: /demo/