Hi! I'd like to suggest adding pretext to the String section.
What it does: Pretext is a 15 KB zero-dependency TypeScript library that measures multi-line text height ~500x faster than DOM-based methods. It uses Canvas measureText + pure arithmetic — no DOM reflows needed.
Why it fits: It solves a core text/string measurement problem that every browser-side JS developer faces. It's framework-agnostic (works with React, Vue, Svelte, Canvas, SVG, Node.js).
Stats:
- 29,500+ GitHub stars (earned within days of release)
-
- Author: Cheng Lou (former React core team, Midjourni)
-
-
-
-
- MIT licensed
Suggested entry:
- [pretext](https://github.com/chenglou/pretext) - Measures multi-line text height 500x faster than DOM, using Canvas measureText with zero reflows.
- ```
**Demo & docs:** [pretext.cool](https://pretext.cool)
Happy to open a PR if preferred!
Hi! I'd like to suggest adding pretext to the String section.
What it does: Pretext is a 15 KB zero-dependency TypeScript library that measures multi-line text height ~500x faster than DOM-based methods. It uses Canvas
measureText+ pure arithmetic — no DOM reflows needed.Why it fits: It solves a core text/string measurement problem that every browser-side JS developer faces. It's framework-agnostic (works with React, Vue, Svelte, Canvas, SVG, Node.js).
Stats:
Suggested entry: