🚨SOMEONE JUST REIMAGINED HOW TEXT RENDERS ON THE WEB AND IT’S INSANE.
The legendary dev behind React, ReasonML, and Midjourney’s frontend
@_chenglou just released Pretext, a tiny TypeScript library that handles text measurement and layout at speeds the DOM can’t even touch.
After weeks of training against real browser rendering, it now matches Chrome, Safari, and Firefox with crazy accuracy.
The demos are unreal: massive text layouts at 120fps, perfect chat bubble wrapping, and magazine-style compositions that look ridiculously clean.
Seeing engineers from Vercel, Remix, Figma, and shadcn hype it up makes this even crazier.
That's why I made a community wall with the best demos from so far 👇
pretextwall.mvp-subha.me
If you tweet something you made with Pretext, feel free to Submit here, It automatically shows up in the wall
My dear front-end developers (and anyone who’s interested in the future of interfaces):
I have crawled through depths of hell to bring you, for the foreseeable years, one of the more important foundational pieces of UI engineering (if not in implementation then certainly at least in concept):
Fast, accurate and comprehensive userland text measurement algorithm in pure TypeScript, usable for laying out entire web pages without CSS, bypassing DOM measurements and reflow