AIToolly product video
Pretext - Text measurement that never touches the DOM.
Pretext.js 是一款革命性的 JavaScript 文本布局库,由前 React 核心团队成员 Cheng Lou 打造。它通过纯算术方式计算多行文本高度,完全避免了触发浏览器昂贵的重排(Reflow)和布局抖动。Pretext.js 支持 TypeScript 优先,具备 12 种以上语言系统的多语言支持,且运行速度比传统 DOM 测量快 500 倍以上,是处理高性能虚拟滚动、AI 聊天界面和复杂 UI 布局的理想选择。
Transcript
Text measurement without touching the DOM.
Meet Pretext, built for complex, text-heavy interfaces.
It lays out 1,000 blocks for a clear performance demonstration.
Measure once, then lay out forever.
Pretext compares traditional DOM measurement with a Canvas-based approach.
It uses real font metrics and supports multilingual text by design.
With zero DOM reads, it targets performance-critical cases.
TypeScript-native, dependency-free, and built around reusable prepared handles.
Try Pretext today and explore what developers are building.


