Skip to content
vibetrend

Pretext

JavaScript library for multiline text measurement and layout without DOM reflow

#221
Today
#236
7 days
#243
30 days
chenglou.meOpen live site ↗
Screenshot of Pretext homepageVisit chenglou.me ↗

What is Pretext?

Pretext is a pure JavaScript/TypeScript library that measures and lays out multiline text without triggering expensive DOM operations like getBoundingClientRect or offsetHeight. It implements its own text measurement using the browser's font engine, supporting all languages and Unicode. The library can render to DOM, Canvas, or SVG.

Designed for developers building chat interfaces, editorial layouts, dynamic typography, and other text-heavy UIs, Pretext provides two main APIs: prepare() for one-time text normalization and measurement, and layout() for fast arithmetic-only calculations on resize. The project was developed with AI coding tools, as indicated by its repository configuration.

Momentum

Daily activity over the last 30 days: upvotes, unique visits, new GitHub stars and Hacker News points.

2026-09-29: 0 upvotes, 0 visits, 0 stars, 0 HN points2026-09-30: 0 upvotes, 0 visits, 9 stars, 0 HN points2026-10-01: 0 upvotes, 0 visits, 8 stars, 0 HN points2026-10-02: 0 upvotes, 0 visits, 11 stars, 0 HN points2026-10-03: 0 upvotes, 0 visits, 9 stars, 0 HN points2026-10-04: 0 upvotes, 0 visits, 11 stars, 0 HN points2026-10-05: 0 upvotes, 0 visits, 7 stars, 0 HN points2026-10-06: 0 upvotes, 0 visits, 17 stars, 0 HN points2026-10-07: 0 upvotes, 0 visits, 8 stars, 0 HN points2026-10-08: 0 upvotes, 0 visits, 7 stars, 0 HN points2026-10-09: 0 upvotes, 0 visits, 13 stars, 0 HN points2026-10-10: 0 upvotes, 0 visits, 5 stars, 0 HN points2026-10-11: 0 upvotes, 0 visits, 20 stars, 0 HN points2026-10-12: 0 upvotes, 0 visits, 12 stars, 0 HN points2026-10-13: 0 upvotes, 0 visits, 16 stars, 0 HN points2026-10-14: 0 upvotes, 0 visits, 8 stars, 0 HN points2026-10-15: 0 upvotes, 0 visits, 17 stars, 0 HN points2026-10-16: 0 upvotes, 0 visits, 17 stars, 0 HN points2026-10-17: 0 upvotes, 0 visits, 8 stars, 0 HN points2026-10-18: 0 upvotes, 0 visits, 13 stars, 0 HN points2026-10-19: 0 upvotes, 0 visits, 11 stars, 0 HN points2026-10-20: 0 upvotes, 0 visits, 15 stars, 0 HN points2026-10-21: 0 upvotes, 0 visits, 14 stars, 0 HN points2026-10-22: 0 upvotes, 0 visits, 10 stars, 0 HN points2026-10-23: 0 upvotes, 0 visits, 16 stars, 0 HN points2026-10-24: 0 upvotes, 0 visits, 13 stars, 0 HN points2026-10-25: 0 upvotes, 0 visits, 9 stars, 0 HN points2026-10-26: 0 upvotes, 0 visits, 13 stars, 0 HN points2026-10-27: 0 upvotes, 0 visits, 12 stars, 0 HN points2026-10-28: 0 upvotes, 0 visits, 8 stars, 0 HN points
30 days agotoday

How do we know it's vibe coded?

vibetrend discovered Pretext automatically. Evidence: GitHub chenglou/pretext; repo has .cursor, AGENTS.md. View source.

Similar vibe-coded apps

Octop screenshot
Octop

Self-hosted AI assistant with multi-user, multi-agent architecture

Cursor★ 11k GitHub stars
freehire screenshot
freehire

Open-source search engine for tech jobs indexed from company career boards

Cursor★ 3.3k GitHub stars
Macro screenshot
Macro

All-in-one workspace unifying email, chat, docs, tasks, CRM, and agents

Claude CodeCursor★ 5.2k GitHub stars