Skip to content

Let textareas grow with their content - #758

Open
sammyhass wants to merge 2 commits into
vercel-labs:mainfrom
sammyhass:fix/textarea-content-height
Open

sammyhass wants to merge 2 commits into
vercel-labs:mainfrom
sammyhass:fix/textarea-content-height

Conversation

@sammyhass

@sammyhass sammyhass commented Nov 2, 2026 •

Copy link
Copy Markdown

Textareas can now grow as you type and shrink when you delete text, up to a configurable height. This removes the need for fixed-height composers or app-side line counting.

Opt in with auto-height-min and auto-height-max. Wrapped text and grouped inputs are supported; existing textareas keep their current behavior by default.

Focused compiler, layout and validation tests pass. Full-suite failures need follow-up; native keyboard and visual checks are outstanding.

Using this as a monkey patch today so hopefully useful!

Measure wrapped textarea content at the allocated width, with bounded growth and caret scrolling. Wire numeric bounds through TypeScript, Zig markup, policy layout and editor documentation.
@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown

@sammyhass is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@sammyhass sammyhass changed the title Add opt-in content-sized textarea height Let textareas grow with their content Nov 2, 2026
@sammyhass
sammyhass marked this pull request as ready for review November 2, 2026 17:28
Comment thread src/primitives/canvas/widget_layout.zig Resolved
Resolve each nested container width before measuring wrapped content, preserving min/max precedence and padding. Cover parent height and following-control placement under native and compiled layout policies.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant