just-dom
v2.1.0
Published
A lightweight library for DOM manipulation
Readme
just-dom
A small library for building the real DOM with typed tag factories, refs, fragments, and a plugin system. Ships as ESM and CJS with TypeScript declarations.
- Documentation: just-dom.vercel.app
- npm:
just-dom
Install
npm install just-domQuick example
import DOM, { createRoot } from "just-dom";
const app = DOM.div({ className: "app" }, [
DOM.h1({}, ["Hello, Just DOM"]),
DOM.p({}, ["Mount below, then edit this tree."]),
]);
createRoot("app", app);createRoot accepts a container id ("app") or an HTMLElement, and appends your root element (see createRoot).
Plugins and jd.config
Use withPlugins to attach official or custom plugins. In apps, the usual pattern is a single module (jd.config.ts) that exports jd for the whole project.
New project (Vite + TypeScript)
npm create just-dom@latest my-appSee create-just-dom on npm and the App setup / CLI docs.
Official plugins
Published under @just-dom/* (e.g. @just-dom/lucide, @just-dom/router). List and authoring notes live in the monorepo packages/plugins/README.md.
