Repository navigation
feat(Textarea): grow from a minimum with lines={{ min, max }} - #615
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Textarea.linesentry ingotchas.jsonexplains when to use{ min }instead of a number. It now appears in every bundle.components.textarearule flagslines={n}on a Textarea. It stays quiet whenresize=is set, because that says the fixed box is intended.{ min }.The native Textarea is a separate component and is unchanged.
Checks
minrows with no handle, growth capped atmaxfollowed by scrolling,{}and{ min: 0 }, and the validator rule.Generated by Claude Code