feat(TextArea): add auto-grow functionality with minRows/maxRows#22
Merged
praisethemoon merged 2 commits intomainfrom Feb 13, 2026
Merged
feat(TextArea): add auto-grow functionality with minRows/maxRows#22praisethemoon merged 2 commits intomainfrom
praisethemoon merged 2 commits intomainfrom
Conversation
Add auto-grow behavior to TextArea component that automatically adjusts height based on content. Users can set minRows for starting height and maxRows to limit growth. When maxRows is exceeded, the textarea becomes scrollable. - Add minRows and maxRows props to enable auto-grow behavior - Implement height adjustment logic using useLayoutEffect and refs - Default resize to 'none' when auto-grow is enabled - Add mergeRefs utility to handle forwarded and internal refs - Update component to use forwardRef for better ref handling - Add comprehensive auto-grow stories and examples - Update documentation with auto-grow usage and best practices
jonah-iden
reviewed
Feb 10, 2026
…ation Reset textarea min-height to 0 before measuring scrollHeight during auto-grow calculation, then restore it afterward. This prevents CSS min-height from inflating the measured scrollHeight, which caused incorrect sizing when minRows equals maxRows. Add story example for minRows=1, maxRows=1 edge case.
Collaborator
Author
jonah-iden
approved these changes
Feb 13, 2026
Collaborator
jonah-iden
left a comment
There was a problem hiding this comment.
Looks good to me now. Love the "this one is a little awkward!" one
Collaborator
Author
|
Gotta stress it to the limit 😂 |
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.

Add auto-grow behavior to TextArea component that automatically adjusts height based on content. Users can set minRows for starting height and maxRows to limit growth. When maxRows is exceeded, the textarea becomes scrollable.
Fixes #19
Risk level: