Pretext
Demos
Small browser demos for the kinds of layout work Pretext unlocks: text height without DOM measurement in the hot path, manual line routing, and width-tight multiline UI.
Accordion
Expand and collapse sections whose text heights are calculated from Pretext.
Bubbles
Tight multiline message bubbles that keep the same line count with less wasted area.
Dynamic Layout
A fixed-height editorial spread with obstacle-aware title routing and continuous flow.
Variable Typographic ASCII
Particle-driven ASCII art comparing proportional measured glyphs against a monospace version.
Editorial Engine
Animated orbs, live text reflow, pull quotes, and multi-column flow with zero DOM measurements.
Justification Comparison
CSS justification, greedy hyphenation, and Knuth-Plass paragraph layout shown side by side to reveal rivers and spacing tradeoffs.
Rich Text
Rich inline text, code spans, links, and chips laid out together, with pills staying whole while text keeps wrapping naturally.
Markdown Chat
A virtualized chat demo using marked for parsing, the rich-text inline flow helper for paragraph content, and pre-wrap for fenced code.
Masonry
A text-card occlusion demo where height prediction comes from Pretext instead of DOM reads.
Virtual Scroll
Thousands of variable-height rows scrolled with zero DOM measurement — heights predicted entirely by Pretext.
Virtual Chat
5,000 chat messages virtualized with live DOM vs Pretext measurement cost, toggleable with width and font-size sliders.
CJK Line Breaking
Kinsoku rules in action — watch how Pretext keeps CJK punctuation off invalid line positions as the width changes.
Old Man & the Sea
Editorial reflow with a drop cap and pull quote — resize the window and watch text reflow in real time.
Floating Languages
Everyday phrases in many languages float across the screen. Hover to illuminate, click to inspect Pretext measurements.
Optimal Line Breaking
Full Knuth-Plass with badness, penalties, fitness classification, and river detection.
Ecosystem catalog
Searchable index of awesome-pretext + discovery repos (classified, debounced UI). Shallow clones live under gitignored upstream/.