ztools

Tiny JS-first reactive UI runtime.

Install

npm install @ztools.org/runtime

Quick start

import { signal, computed, createTags, mount } from "@ztools.org/runtime";

const [div, p, button] = createTags("div", "p", "button");

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.body);

API

Examples

Live demos are published here: /examples/

Deploy Flow

GitHub Pages is deployed from a generated build/ artifact.

npm run build:pages

Source: github.com/maxistar/ztools