# min-dom

> A minimal dom utility toolbelt

Latest version **5.3.0** (published 2026-02-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install min-dom
pnpm add min-dom
yarn add min-dom
bun add min-dom
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.3.0 |
| Published | 2026-02-16 |
| First published | 2015-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 27.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | bpmn.io |
| Maintainers | bpmn-io-admin, nikku, barmac, philippfromme, maxtru, skaiir-camunda, vsgoulart, barinali, jarekdanielak, alekseymanetov, simon-steinruecken-camunda |
| Keywords | dom, util, utility, minimal, event, query, jquery, component |

## Links

- npm: https://www.npmjs.com/package/min-dom
- Repository: https://github.com/bpmn-io/min-dom
- Homepage: https://github.com/bpmn-io/min-dom#readme
- Issues: https://github.com/bpmn-io/min-dom/issues
- npm.io page: https://npm.io/package/min-dom

## Dependencies (2)

- [domify](https://npm.io/package/domify.md) ^3.0.0
- [min-dash](https://npm.io/package/min-dash.md) ^5.0.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 5.3.0 (latest) — 2026-02-16
- 4.2.1 (backports) — 2024-05-29
- 5.2.0 — 2026-01-21
- 5.1.2 — 2025-12-11
- 5.1.1 — 2024-05-29
- 4.2.0 — 2024-05-29
- 5.1.0 — 2024-05-29
- 5.0.0 — 2024-03-11
- 4.1.0 — 2023-01-11
- 4.0.3 — 2022-09-30
- 4.0.2 — 2022-09-29
- 4.0.1 — 2022-09-14
- 4.0.0 — 2022-09-14
- 3.2.1 — 2022-05-18
- 3.2.0 — 2022-05-16
- … 16 more at https://npm.io/package/min-dom/versions

## README

# min-dom

[![CI](https://github.com/bpmn-io/min-dom/workflows/CI/badge.svg)](https://github.com/bpmn-io/min-dom/actions?query=workflow%3ACI)

A minimal dom utility toolbelt. Library friendly and based on utilities provided by [component](https://github.com/component).


## Footprint

This library is tiny (`2Kb` in size) and still exposes all fundamental utilities:

```bash
$ npm run bundle
$ gzip dist/index.js
$ du -b dist/*.gz
2351    index.js.gz
```


## Features

The library exposes the following tiny dom helpers:

* `assignStyle` - add inline styles to a node
* `attr` - get and set node attributes
* `classes` - class name helper
* `clear` - remove children from a node
* `closest` - get the closest parent by selector;
* `delegate` - event deletation support; [delegate-events](https://www.npmjs.com/package/delegate-events)
* `domify` - html to elements; [domify](https://github.com/component/domify)
* `event` - event binding; [component-event](https://github.com/component/event)
* `matches` - selector match check
* `query` - native selector query support
* `remove` - detach a node from its parent


## Related

* [min-dash](https://github.com/bpmn-io/min-dash) - minimal lodash inspired utility toolbelt
* [tiny-svg](https://github.com/bpmn-io/tiny-svg) - tiny SVG utility toolbelt


## License

MIT

---
_Source: https://npm.io/package/min-dom · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
