Pretext

Pretext by Cheng Lou. Pure JavaScript/TypeScript library for fast, accurate multi-line text measurement and layout without DOM reflow. Use whenever working on typography rules, text-heavy components, button or label overflow checks, virtualized lists, masonry layouts, balanced text, shrink-wrap text, dynamic input autosizing, layout-shift prevention on async text loads, or any case where text dimensions affect layout decisions. Triggers on: text measurement, text layout, text overflow, button label, label fits, multi-line text, text height, shrink-wrap, balanced text, virtualization, masonry, typography rules, layout shift, async text, label overflow, input autosize.

tommylower 89560c6 8.3 KB Updated

File contents

tommylower/cortex/tree/main/design/tools/pretext commit 89560c6fd7

Frequently asked questions

npx skillmds@latest add tommylower/pretext