@shipitandpray/pretext-forms

Auto-sizing form fields that know their height before render. Zero CLS. Zero flash.

Pre-render measurement

Height is calculated in JS before the browser paints. No hidden divs, no scrollHeight.

Zero CLS

Correct dimensions on first paint. No layout shift, ever.

Cross-browser

Works in Chrome, Firefox, Safari. No dependency on CSS field-sizing.

Drop-in replacement

Same API as native textarea/input/select. Just swap the component.

Native textarea reflow flash

Uses scrollHeight measurement post-render. Watch for the 1-frame flash when lines wrap.

Height: -- | Lines: --

pretext-forms zero cls

Uses @chenglou/pretext for pre-render layout. Height is known before paint.