Skip to content

feat(Textarea): grow from a minimum with lines={{ min, max }} - #615

Merged
lorant-one merged 1 commit into
previewfrom
claude/textarea-auto-min
Nov 25, 2026
Merged

lorant-one merged 1 commit into
previewfrom
claude/textarea-auto-min

Conversation

@lorant-one

Copy link
Copy Markdown
Member

What

A growing Textarea starts at one row when empty, so it reads as an input. To make it taller, apps and agents set a fixed lines={3}. That also turns growing off and adds a drag handle, and nothing warned about it. Our apps do this often: about 9 of 21 textareas in Tavilio, 10 of 12 in Sigilio and 10 of 13 in Chirio.

This PR adds an object form for lines:

  • lines={{ min: 3 }} starts the field at 3 rows. It still grows with the text and has no drag handle.
  • lines={{ min: 3, max: 8 }} also stops growing at 8 rows, and the field scrolls after that.

A number still fixes the height and keeps the handle, and the default is still "auto".

Alongside the prop:

  • Gotcha: a new Textarea.lines entry in gotchas.json explains when to use { min } instead of a number. It now appears in every bundle.
  • Validator: a new components.textarea rule flags lines={n} on a Textarea. It stays quiet when resize= is set, because that says the fixed box is intended.
  • Docs: the Textarea page has a new "Minimum height" section, and the description and Field examples now use { min }.
  • CHANGELOG: updated under Unreleased.

The native Textarea is a separate component and is unchanged.

Checks

  • Tests cover the min rows with no handle, growth capped at max followed by scrolling, {} and { min: 0 }, and the validator rule.
  • Full core suite: 349 files and 4920 tests pass. Typecheck is clean.

Generated by Claude Code

@lorant-one
lorant-one merged commit 0c889c4 into preview Nov 25, 2026
15 of 20 checks passed
@lorant-one lorant-one added the approved label Nov 26, 2026 — with Claude
@lorant-one lorant-one mentioned this pull request Nov 26, 2026
7 tasks done
@lorant-one
lorant-one deleted the claude/textarea-auto-min branch November 29, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants