What problem does it solve?
Standard web layout tools like CSS and DOM APIs cannot efficiently create dynamic, geometric text interactions such as text flowing around moving obstacles, per-glyph kinetic typography, or text-as-geometry gameplay, as they lack pre-render line break measurement and per-grapheme positioning without expensive DOM reflows.
Core Features & Use Cases
- DOM-free text measurement: Uses the @chenglou/pretext library to calculate line breaks, per-line widths, and per-grapheme positions without touching the DOM, enabling 60fps interactive text layouts.
- Creative demo templates: Includes pre-built single-file HTML templates for common patterns like text reflow around a draggable orb, ASCII obstacle typography, and shatter particle effects.
- Use case example: Build an interactive editorial demo where a real manifesto flows around a morphing 3D wireframe shape, or a breakout game where bricks are measured words from a poem.
Quick Start
Ask the AI to generate a creative pretext demo for your needs, such as a text reflow effect around a moving object or a kinetic typography animation, and it will produce a ready-to-open single HTML file you can run locally with a simple Python server.