AIToolly product video
Pretext - Text measurement that never touches the DOM.
Pretext.js to przełomowa biblioteka JavaScript i TypeScript, która umożliwia pomiar oraz układanie tekstu wielowierszowego wyłącznie za pomocą arytmetyki. Dzięki eliminacji operacji na DOM, takich jak getBoundingClientRect, Pretext.js zapobiega kosztownym reflowom i thrashingowi układu. Jest do 500 razy szybszy od tradycyjnych metod, obsługuje ponad 12 systemów pisma i idealnie nadaje się do wirtualnego przewijania oraz interfejsów czatów AI.
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.


