pretext

Provide a TypeScript library for DOM-free text measurement and layout.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/DonZzzilla/kalshi-explorer --skill pretext-donzzzilla
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pretext
Source: https://github.com/DonZzzilla/kalshi-explorer/tree/main/skills/user-skills/creative/pretext
Command: npx skills add https://github.com/DonZzzilla/kalshi-explorer --skill pretext-donzzzilla

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @chenglou/pretext, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill empowers users to create unique, text-based visuals and interactive demos, eliminating the need for complex software and providing a fun way to express creativity.

Core Features & Use Cases

  • Text Layout: Generate geometrically accurate text layouts for ASCII art, typographic flows, and text-as-geometry games.
  • Interactive Demos: Build interactive demos with text flowing around shapes, shatter effects, and kinetic typography.
  • Use Case: Imagine you want to create an interactive website that displays text around a moving object. This Skill allows you to design the layout and behavior of the text without needing to write complex code.

Quick Start

Use the pretext skill to create a text reflowing around a moving orb in HTML format by providing the text and desired dimensions.

Frequently Asked Questions about pretext

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create interactive text-based visuals without relying on the DOM?

You can create interactive text-based visuals by using a TypeScript library for DOM-free text measurement and layout. This approach supports ASCII art, typographic flows, and text-as-geometry games without complex software.

What is kinetic typography and how does text layout handle shatter effects?

Kinetic typography involves animating text to create dynamic visuals. The text layout mechanism uses geometrically accurate measurements to render shatter effects and control typographic flows around shapes.

Does this text layout approach work for building interactive demos in TypeScript?

Yes, the text layout approach works for building interactive demos in TypeScript. It provides a dedicated library that handles text measurement and grapheme splitting to accurately render text-based visuals.

How do I make text reflow around a moving object in an interactive demo?

To make text reflow around a moving object, you provide your text and desired dimensions to the layout library. It calculates geometrically accurate text positioning to dynamically flow around shapes.

Why do I need canvas measurement and grapheme splitting for ASCII art?

Canvas measurement and grapheme splitting are required for ASCII art to ensure geometrically accurate text rendering. They allow the layout engine to correctly measure text boundaries without relying on the DOM.

What's the best way to design text-as-geometry games without complex code?

The best way to design text-as-geometry games without complex code is using a DOM-free text layout library. It handles geometric measurement and grapheme splitting, enabling you to focus on game logic.