ES Modules

InDom is fully compatible with ES Modules environments.
You can import it directly in supported browsers or through any bundler that understands ESM syntax.

Example (browser import):
<script type="module">
	import { InDom, InDomArray, $1, $a, $id, $n, $v } from './dist/indom.esm.min.js';
	InDom.onReady(() => {
		$1('.example').setHtml('Hello from InDom!');
	});
script>

Example (bundler import):
import { InDom, InDomArray, $1, $a, $id, $n, $v } from 'indom/dist/indom.esm.min.js';

All module exports are named — import only what you need, or import the full library as InDom.
Tree-shaking works naturally in all modern bundlers.
A source map ( dist/indom.esm.min.js.map) is included for debugging. Most editors and browsers pick it up automatically when using the minified build.


Modern DOM Power
for TypeScript, ESM & Plain JS
3.8KB JavaScript library that simplifies DOM manipulation
with a clean, chainable API for events, data, inputs harvesting, and more.
Automatic Cleanup,
Leak-Proof by Design
Events and state are cleared when elements leave the DOM,
even if removal happens outside InDom.
Cleaner Code,
Better Ergonomics
Get the InDom object directly in callbacks.
One element, one instance.
Works With Your Existing Stack
Use InDom on its own or alongside any library or framework,
its architecture ensures a seamless integration.