Introduction

Reactive primitives for any runtime: signals, data, routing, DOM and browser state. JSX, custom elements and the UI Kit are optional modules.

ElementsKit is a library of reactive primitives. Pick one, use it in plain JavaScript, React, a custom element, or on the server. Everything builds on one small core; JSX, custom elements and the UI Kit are modules you add only if you want them.

Coreelements-kit/signals

Reactive state. The only requirement; every module below needs only this.

Primitiveselements-kit/utilities/*

Renderingelements-kit/render

Build DOM from signals.

UI Kitelements-kit/ui/*

Components styled by CSS.

Integrationselements-kit/integrations/*

Signals in your framework.

Every piece is its own import, so you ship only what you use.

  • Compose, don't configure. Small focused APIs: signal, computed, on, fromEvent, async. Combine primitives instead of maintaining an overloaded interface.
  • Close to the platform. promise extends Promise. Custom elements are HTMLElement. JSX compiles to document.createElement. No virtual DOM, no proxies.
  • Predictable and explicit, no magic. Signals are reactive; nothing else is. No hidden subscriptions.
  • Designed for the AI age. Code is cheap; maintenance still isn't. Swap one block at a time.

Install

pnpm add elements-kit

Full setup (TypeScript JSX config, CDN, Deno) in Installation.

import { , ,  } from "elements-kit/signals";
import {  } from "elements-kit/utilities/network";
import {  } from "elements-kit/utilities/media-query";
import {  } from "elements-kit/utilities/event-listener";

const  = (0);
const  = ("(prefers-color-scheme: dark)");
const  = (() => `${()} clicks · ${() ? "online" : "offline"}`);

const  = .("button")!;
(, "click", () => (() + 1));

(() => {
  . = ();
  ...("dark", ());
});

Same signals in every tab. See the full progression (signals → element → component → custom element) in the Quick start.

Built for the AI age

Explicit contracts survive edits by humans or agents. Machine-readable index: /llms.txt (short) · /llms-full.txt (every page concatenated).

Start here

Explore


ElementsKit is built and maintained by the Quba team.