Getting started
Here’s the entire development loop — write a component, run the dev server, click around, edit, see it update — in forty seconds:
Everything in that session is the whole story: plain TypeScript + JSX, your existing dev server (Vite here — anything that does JSX works), and a browser. No framework CLI, no compiler plugin, no devtools extension required.
Run it yourself
Section titled “Run it yourself”npm install kerfjsPoint your tsconfig.json at kerf’s JSX runtime:
{ "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "kerfjs" }}And write the counter from the animation:
import { signal, mount, delegate } from 'kerfjs';
const count = signal(0);const root = document.getElementById('app')!;
mount(root, () => ( <button class="btn" data-action="inc"> Clicked {count} times </button>));
delegate(root, 'click', '[data-action="inc"]', () => count.value++);Three things to notice, because they’re the whole mental model:
{count}is the signal itself, notcount.value. That makes it a bound hole — a click updates that one text node directly, with no render re-run. Values bind; structure re-renders. (The edit in the animation does the same for an attribute:class={cls}binds acomputedthat flips the button’s look at the fifth click.)mount()re-runs the render only when a signal it read changes. This render reads nothing, so it runs exactly once.delegate()is one listener on the root, dispatched by selector — no per-element handlers, nothing to unbind when the DOM changes.
Where to go next
Section titled “Where to go next”- Overview — what kerf is, the architecture in one diagram.
- Reactivity — signals, computeds, effects, and fine-grained bindings.
- Examples — seven complete apps, from TodoMVC to a no-build poll served as raw source.
- Coming from another framework? — side-by-side translations from React, Vue, Svelte, and more.
Prefer no build step at all? The html tagged template gives you identical semantics from a plain <script type="module"> — see the live-poll example, whose running source is exactly what its author wrote.