{
 "kind": "tool",
 "slug": "chenglou-pretext",
 "path": "tools/chenglou-pretext/",
 "name": "Pretext",
 "maker": null,
 "density": "basic",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "UI components and icons",
   "tools/ui-components/"
  ]
 ],
 "lead": "Fast, accurate text measurement and layout in JavaScript without the DOM.",
 "chips": [
  {
   "label": "UI components and icons",
   "path": "tools/ui-components/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install @chenglou/pretext"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/chenglou/pretext"
  },
  {
   "label": "Website",
   "href": "https://github.com/chenglou/pretext#readme"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/chenglou/pretext"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 19, 2026",
   "note": "Latest GitHub release Oct 14, 2026. ",
   "src": "https://github.com/chenglou/pretext"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "5 projects",
   "status": "info",
   "sub": "#127 of 230 in its category",
   "note": "Dependency in 5 public GitHub projects set up for AI coding agents that we scanned (0.1%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Community skills",
   "status": "info",
   "sub": "1 skills by others",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Pretext does",
   "parts": [
    {
     "t": "prose",
     "text": "Fast, accurate text measurement and layout in JavaScript without the DOM."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Pretext popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "62",
       "of": "/ 100",
       "l": "Gid Score, #849 overall"
      },
      {
       "n": "2.8M",
       "l": "downloads a week, npm"
      },
      {
       "n": "51.1K",
       "l": "GitHub stars"
      },
      {
       "n": "5",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Pretext is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "Pretext joined the catalog on its public numbers (2,769,538 downloads a week on npm and 51,095 GitHub stars), not on our project count: it is a dependency in 11 public GitHub projects of our scan, 5 of them set up for AI coding agents.",
      "Projects that use it most often also use Next.js (54.5%), React (72.7%), Zod (63.6%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "5 projects, 0.2%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 54.5% of its projects",
       "v": "Next.js",
       "path": "tools/next/"
      },
      {
       "l": "In 72.7% of its projects",
       "v": "React",
       "path": "tools/react/"
      },
      {
       "l": "In 63.6% of its projects",
       "v": "Zod",
       "path": "tools/zod/"
      },
      {
       "l": "In 54.5% of its projects",
       "v": "Vite",
       "path": "tools/vite/"
      },
      {
       "l": "In 36.4% of its projects",
       "v": "Vercel Analytics",
       "path": "tools/vercel-analytics/"
      },
      {
       "l": "In 36.4% of its projects",
       "v": "Three.js",
       "path": "tools/three/"
      },
      {
       "l": "In 36.4% of its projects",
       "v": "Marked",
       "path": "tools/marked/"
      },
      {
       "l": "In 90.9% of its projects",
       "v": "TypeScript",
       "path": "tools/typescript/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about Pretext",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "pretext: Use when building creative browser demos with @chenglou/pretext — DOM-free text layout for ASCII art, typographic flow around obstacles, tex"
       ]
      },
      {
       "title": "More in UI components and icons",
       "path": "tools/ui-components/",
       "items": [
        {
         "text": "Lucide React",
         "path": "tools/lucide-react/"
        },
        {
         "text": "Class Variance Authority",
         "path": "tools/class-variance-authority/"
        },
        {
         "text": "Radix UI",
         "path": "tools/radix-ui/"
        },
        {
         "text": "Sonner",
         "path": "tools/sonner/"
        },
        {
         "text": "cmdk",
         "path": "tools/cmdk/"
        },
        {
         "text": "React Day Picker",
         "path": "tools/react-day-picker/"
        },
        {
         "text": "Vaul",
         "path": "tools/vaul/"
        },
        {
         "text": "react-resizable-panels",
         "path": "tools/react-resizable-panels/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Pretext",
       "me": true,
       "facts": [
        "MIT",
        "Gid 62",
        "2.8M/wk"
       ]
      }
     ],
     "more": "Compare Pretext with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install @chenglou/pretext"
    },
    {
     "t": "gap",
     "text": "No step-by-step start for Pretext yet: we have not written its hand-checked card."
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm @chenglou/pretext"
  ],
  [
   "Category",
   "UI components and icons"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Gid Score",
   "62.3"
  ],
  [
   "Rank in category",
   "#127 of 230"
  ],
  [
   "GitHub",
   "chenglou/pretext"
  ],
  [
   "Last change",
   "Nov 19, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/chenglou.png"
}