chenglou/pretext

Source
GitHub
First trending
Category
Design and UI
GitHub stars
50,382
Main language
TypeScript

This page introduces an external open-source repository. It is not an HDATF product.

chenglou/pretext

What it does

A JavaScript and TypeScript library that measures and lays out multiline text with its own logic, so apps avoid DOM measurements that trigger layout reflow. Results can be rendered to DOM, Canvas or SVG.

How it helps ATF

Could be a reference for long message lists and chat views in ATF Works, where measuring text height without DOM reflow matters. Its Markdown chat demo walks through that case.

License

MIT Permissive. Commercial use and changes are allowed if the copyright notice is kept.

More in this category

  • VoltAgent/awesome-design-md
    A curated collection of DESIGN.md files, plain markdown documents describing the design tokens, patterns and rules of well-known websites. Placed in a project, one lets an AI coding agent generate UI that follows that design language.
  • bwya77/vscode-dark-islands
    A dark color theme for VS Code and compatible editors such as VSCodium, with floating glass-style panels, rounded corners, a pill-shaped activity bar and scrollbars, and warm syntax highlighting.
  • alexpate/awesome-design-systems
    A curated list of design systems from companies and organizations. Each entry is tagged for whether it offers coded components, voice and tone guidance, a designer kit or public source code.
  • lukilabs/beautiful-mermaid
    beautiful-mermaid is a TypeScript library that renders Mermaid diagrams as themeable SVG, or as ASCII and Unicode text for terminals, without DOM dependencies. It supports flowchart, state, sequence, class, ER and XY chart diagrams.
  • google-labs-code/design.md
    DESIGN.md is a file format that describes a design system to coding agents, combining design tokens in YAML front matter with written rationale in markdown. A linter checks the file against the spec, token references and WCAG contrast.

Only repositories in the ranked Trendshift lists are included, and the lists are used only to find candidates. We do not copy their ranks. Descriptions, licenses and star counts come from each GitHub repository. The notes are our own reading. We have not tested these projects, and a place on a trending list does not prove quality.

View on GitHub (opens in a new tab)