# crelt

> Tiny DOM-element-creation utility

Latest version **1.0.7** (published 2026-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install crelt
pnpm add crelt
yarn add crelt
bun add crelt
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2026-06-27 |
| First published | 2020-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Marijn Haverbeke |
| Maintainers | marijn |
| Keywords | dom, creation, crel |

## Links

- npm: https://www.npmjs.com/package/crelt
- Repository: https://code.haverbeke.berlin/marijn/crelt
- Issues: https://code.haverbeke.berlin/marijn/crelt/issues
- npm.io page: https://npm.io/package/crelt

## 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

- 1.0.7 (latest) — 2026-06-27
- 1.0.6 — 2023-05-17
- 1.0.5 — 2020-12-15
- 1.0.4 — 2020-03-13
- 1.0.3 — 2020-03-13
- 1.0.2 — 2020-03-12
- 1.0.1 — 2020-03-12
- 1.0.0 — 2020-03-12

## README

# CRELT

Tiny DOM-element creation utility. Exports a single (default) value,
which is a function that you call with:

 - A tag name string or DOM element.

 - Optionally an attribute object mapping names to values. When the
   values are strings, they are added to the element with
   `setAttribute`. When they have another type, they are assigned as
   regular properties (mostly useful for event handlers via `onclick`
   and such). When an attribute's value is null or undefined, it is
   not assigned.

 - Any number of children, which may be null (ignored), strings (added
   as text nodes), DOM nodes (added), or arrays (each element is added
   separately).

The function returns a DOM element.

## License

This software is licensed under an MIT license.

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