Pretext
github.com · Package · Active
Pure JavaScript library for multiline text measurement and layout
- Developer tools
- Package
- TypeScript
- Day-7 check
- Day-30 check
- text layout
- typography
- javascript
- occlusion
- text measurement
- typescript
- virtualization
- canva
- line breaking
- multiline text
- Stars
- 51.1k
- Forks
- 2.8k
- Open issues
- 44
- Last commit
- Releases
- 1
- Found
- 8 months ago
GitHub figures as of . They are context, not a ranking.
Pretext is a pure JavaScript and TypeScript library that measures and lays out multiline text without DOM measurement calls. It can render results to the DOM, Canvas or SVG. It suits front-end developers building text-heavy interfaces such as long virtualized lists and typographic layouts.
Repository description on GitHub: “Fast, accurate & comprehensive text measurement & layout”
What it does
- Measures multiline text without triggering browser reflow
- Renders layout output to the DOM, Canvas or SVG
- Handles many languages with its own measurement logic
- Demos and a Markdown chat example in the repository
Good for
- Compute text height before rendering a long virtualized list
- Lay out multiline text on a Canvas or SVG surface
Suits: Front-end developers who need fast text layout.
Worth knowing: The demos are not part of the npm package and need the repository to run.
What you can try
Install it with npm as @chenglou/pretext; to run the demos, clone the repository and run bun start.
Install
npm install @chenglou/pretextTaken from the project’s README. Read the project’s own instructions before running anything.
Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.
Found vs. released
Kip first saw Pretext on , when chenglou created its repository on GitHub. The oldest published release on GitHub is v1.0.0, dated . Its first tagged release came 221 days after it was found.
Day-7 and day-30 updates
Day 7 no new release
- No tagged release was published in the first 7 days after it was found (GitHub release dates).
Checked , later than day 7 because tracking began after.
Day 30 no new release
- No tagged release was published in the first 30 days after it was found (GitHub release dates).
Checked , later than day 30 because tracking began after.
Release timeline every entry links to its source
- Repository created on GitHub: chenglou/pretext
- Found: chenglou created its repository on GitHub. GitHub
- Release v1.0.0
- Day-7 check recorded by Kip (details)
- Day-30 check recorded by Kip (details)
Quick answers
- When was Pretext released?
- Its first tagged release on GitHub is dated 14 Oct 2026. Kip found it on GitHub on 7 Mar 2026.
- Is Pretext open source?
- Its source is public on GitHub at chenglou/pretext; check the repository for licence terms.
- What does Pretext run on?
- Library.
- Is Pretext free?
- It is open source, so the code is free to read and run; check the licence for terms.
- Is Pretext still maintained?
- Yes. It had a commit or release in the last 90 days as of the latest check.
Provenance
| Source | Record | Last checked |
|---|---|---|
| GitHub | listing official API record | |
| GitHub repository | chenglou/pretext REST API record | |
| GitHub Releases | release list REST API record |
Stable ID github-1175538883. Summary written by KipFound’s editor.
Share
Similar tools
Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.