pretext

Measure and wrap multiline text without DOM reflows using @chenglou/pretext.

150|25|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/Devsoul2026/Hermes-One-Click --skill pretext-devsoul2026
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pretext
Source: https://github.com/Devsoul2026/Hermes-One-Click/tree/main/hermes-agent/skills/creative/pretext
Command: npx skills add https://github.com/Devsoul2026/Hermes-One-Click --skill pretext-devsoul2026

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Pretext provides a DOM-free method to measure and layout multiline text for creative demos, enabling text to flow around obstacles and render as geometry in the browser without relying on DOM reflows.

Core Features & Use Cases

  • DOM-free text measurement and layout for ASCII-art and typographic experiments.
  • Flow-around-obstacle patterns for kinetic typography and editorial visuals.
  • Single-file HTML demos with no build steps, powered by the @chenglou/pretext library.

Quick Start

Open a sample HTML in a browser that imports pretext and renders a flowing text demo around an obstacle.

Frequently Asked Questions about pretext

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

FAQPage Schema
How do I measure and wrap text without DOM reflows for creative demos?

To measure and wrap text without DOM reflows, you use a DOM-free text layout method that calculates multiline geometry directly in the browser. This approach enables kinetic typography and text-driven visuals without triggering browser reflow cycles.

What is DOM-free text layout and when do I need it for ASCII-art?

DOM-free text layout is a technique for measuring and positioning multiline text without relying on the browser's DOM reflow engine. You need it for ASCII-art layouts and typographic experiments where rendering text as geometry is required.

Can I flow text around obstacles in a single-file HTML demo without a build step?

Yes, you can flow text around obstacles in a single-file HTML demo without a build step. By importing the pretext library directly in the browser, you can render flowing text patterns for kinetic typography without any build configuration.

Does pretext work in a standard browser environment for kinetic typography?

Yes, pretext works in a standard browser environment for kinetic typography. It outputs a simple, single-file HTML workflow that runs directly in the browser, allowing you to create text-driven visuals without a build step.

What is the best way to render text as geometry for editorial visuals?

The best way to render text as geometry for editorial visuals is using a DOM-free text layout library like pretext. It allows text to flow around shapes and obstacles, enabling complex typographic experiments in a single HTML file.

Why should I avoid DOM reflows when building text-driven visuals?

You should avoid DOM reflows when building text-driven visuals to maintain smooth animation performance. DOM-free text layout calculates geometry directly, preventing the browser from recalculating styles and layout on every frame during kinetic typography.