pretext

Generate interactive text-based visual effects using canvas measurement and layout.

Updated May 3, 2026
One-click install
npx skills add https://github.com/eliottbusiness/DeptFlow-Agent --skill pretext-eliottbusiness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pretext
Source: https://github.com/eliottbusiness/DeptFlow-Agent/tree/main/profile/skills/creative/pretext
Command: npx skills add https://github.com/eliottbusiness/DeptFlow-Agent --skill pretext-eliottbusiness

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @chenglou/pretext, esm.sh, gsap, lil-gui, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies the creation of interactive and visually captivating text-based effects and demos, providing a creative toolkit for designers and developers.

Core Features & Use Cases

  • Text Layout: Measure and position text in unique and artistic ways.
  • Dynamic Text: Create text that moves, flows, and interacts with elements.
  • Generative Art: Generate visual art using text as the main element.
  • Use Case: Imagine you need a unique landing page that showcases your company's technology by using text in a dynamic and engaging way. This Skill can help you create text-based visuals that highlight the key features of your product.

Quick Start

To get started, import the Pretext library and use it to create a text layout that reflows around a moving orb. For example, use the following code:

const prepared = prepareWithSegments(TEXT, FONT);
const { lines } = layoutWithLines(prepared, 320, 26);
for (let i = 0; i < lines.length; i++) {
  ctx.fillText(lines[i].text, 0, i * 26);
}

Frequently Asked Questions about pretext

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

FAQPage Schema
How do I measure and layout text for generative art without relying on the DOM?

DOM-free text measurement and layout is achieved by preparing text segments and calculating line breaks directly on the canvas. This allows precise positioning and styling of interactive text-based visual effects without DOM dependencies.

Can I use GSAP for interactive text animations in creative coding demos?

Yes, interactive text animations in creative coding demos can be built using GSAP. The Skill integrates GSAP to drive dynamic text movements and interactions, allowing text to flow and react to elements like a moving orb.

What is the best way to create dynamic text that reflows around moving objects?

To create dynamic text that reflows around moving objects, you use canvas measurement to prepare text segments and calculate layout lines. This generative art approach provides fine control over text placement as interactive elements move.

Do I need any specific libraries to start building typography demonstrations?

Building typography demonstrations requires the @chenglou/pretext library, esm.sh, gsap, and lil-gui. These dependencies provide the necessary environment for rendering, interactive text layout, and debugging controls for your visual effects.

Does this approach support fine control over text placement and styling for landing pages?

Yes, this approach supports fine control over text placement and styling for landing pages. By utilizing canvas measurement and layout functions, you can position text in unique, artistic ways to dynamically highlight product features.