Pretext — библиотека, которая считает текстовую вёрстку в 500 раз быстрее браузера. Зачем это нужно и как работает / Хабр

https://habr.com/ru/articles/1020058/

> 28 марта 2026 года инженер Midjourney Cheng Lou выложил в открытый доступ библиотеку Pretext, которая за неделю набрала почти 40 тысяч звёзд на GitHub.
Это движок текстовой вёрстки на чистом TypeScript, который полностью обходит DOM и браузерный layout рефлоу. За этим стоит вполне ощутимая проблема и красивое решение.

Объём ~15 КБ в gzip. Зависимостей — ноль (0). Работает с React, Vue, Svelte, Angular, ванильным JS. Работает в браузерах, Node.js, Deno, Bun, Cloudflare Workers, Web Workers.
Pretext заменяет измерение текста, а не DOM.

Применение:
– виртуализация списков;
– стриминг AI‑ответов;
– креативная типографика;
и т.п.

Живые демо можно посмотреть на chenglou.me/pretext
https://chenglou.me/pretext/

#pretext #typescript

Pretext – библиотека, которая считает текстовую вёрстку в 500 раз быстрее браузера. Зачем это нужно и как работает

28 марта 2026 года инженер Midjourney Cheng Lou выложил в открытый доступ библиотеку, которая за неделю набрала почти 40 тысяч звёзд на GitHub. И имя ей - Pretext . Это движок текстовой верстки на чистом TypeScript, который полностью обходит DOM и браузерный layout рефлоу. За этим стоит вполне большая проблема и красивое решение. Давайте разберемся, что это такое, зачем оно нужно, как устроено и стоит ли тащить к себе в проект.

https://habr.com/ru/articles/1020058/

#pretext #javascript #text_layout #производительность #dom_reflow #typescript #виртуализация #open_source

Pretext – библиотека, которая считает текстовую вёрстку в 500 раз быстрее браузера. Зачем это нужно и как работает

28 марта 2026 года инженер Midjourney Cheng Lou выложил в открытый доступ библиотеку, которая за неделю набрала почти 40 тысяч звёзд на GitHub. И имя ей - Pretext . Это движок текстовой верстки на...

Хабр

This little illuminated dragon is very happy about Pretext. He's too busy having fun to care about people's "hot takes" on how "it's not that special."

(This little dragon also only works on desktop right now but maybe I'll do mobile later)

https://illustrated-manuscript.vercel.app

https://x.com/Riyvir/status/2038093450139279426

#illustration #dragon #webapp #pretext #desktop

Illustrated Manuscript

I haven't even seen one single demo of #pretext that made sense outside the context of it being a plaything.

#pretext seems to be hyped right now - any infos about #a11y? https://github.com/chenglou/pretext

#javascript #webdev #webdesign

GitHub - chenglou/pretext

Contribute to chenglou/pretext development by creating an account on GitHub.

GitHub
The more I look at these #Pretext demos, the more I want from them. They _look_ cool, but I don’t want to read any of them. When I do read them, the text ends abruptly.
Cheng Lou, the engineer behind React and Midjourney, has released Pretext - a 15KB open-source library that solves a 30-year web bottleneck around text layout measurement. Built using AI coding tools, it achieves 300-600x performance gains and garnered 14,000 GitHub stars within 72 hours. https://venturebeat.com/technology/midjourney-engineer-debuts-new-vibe-coded-open-source-standard-pretext-to #AIagent #AI #GenAI #AIInfrastructure #Pretext

There is some really impressive text and layout stuff happening in #Pretext. I would love to see CSS exclusions, a better justification algorithm, and improved CSS column support to address some of what Pretext is doing.

https://somnai-dreams.github.io/pretext-demos/

Pretext Demos

Interactive demonstrations of pretext — a pure-arithmetic text layout engine. Zero DOM reads, instant measurement, proportional font precision.

Justine Moore (@venturetwins)

코딩 에이전트의 발전으로 짧은 기간에 프로젝트 주변에 큰 생태계가 형성되는 모습이 인상적이라는 내용이다. 특히 Pretext 데모가 화제이며, 오픈소스 소프트웨어가 이런 확산에 중요한 역할을 했다고 평가한다.

https://x.com/venturetwins/status/2038299082016657582

#codingagents #opensource #aiagents #pretext #developertools

Justine Moore (@venturetwins) on X

My entire feed is sick Pretext demos. It's truly insane to see how much we can do with coding agents - there's already an entire ecosystem around a project that shipped on Friday night. Also what a case for open source software 👌

X (formerly Twitter)
Pretext

Exciting new browser library from Cheng Lou, previously a React core developer and the original creator of the react-motion animation library. Pretext solves the problem of calculating the height of …

Simon Willison’s Weblog