1 min readfrom InfoQ

Pretext.js Bypasses DOM Layout Reflow, Enabling Advanced UX Patterns at 120 FPS

Pretext.js Bypasses DOM Layout Reflow, Enabling Advanced UX Patterns at 120 FPS

Cheng Lou, a Midjourney engineer, recently released Pretext, a 15KB open-source TypeScript library that measures and lays out text without browser layout reflows, enabling advanced UX/UI patterns like infinite lists, masonry layouts, and scroll position anchoring to run at 60-120 fps. Pretext was built using an AI loop that reverse-engineered the DOM’s layout calculations.

By Bruno Couriol

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#rows.com
#Pretext
#DOM layout
#layout reflow
#advanced UX patterns
#TypeScript
#60-120 fps
#text layout
#open-source
#infinite lists
#masonry layouts
#scroll position anchoring
#UX/UI patterns
#AI loop
#Midjourney
#performance
#reverse-engineered
#engineer
#measurements
#calculations