Skip to content

Conversation

@gaurav1603
Copy link

This update enhances the user experience by enabling automatic resizing of the textarea field. Previously, the textarea remained a fixed height, causing overflow issues or requiring manual resizing by the user.
With this change:

  • The textarea now expands dynamically based on its content.
  • Height adjusts automatically by settings it to "auto" first, then recalculating with scrollheight.
  • It improves readability and prevents content from begin hidden.

Changes made:

  • add useRef to access the <textarea> DOM element.
  • Implemented HandleInput() to dynamically update the height.
  • Applied the function using onInput in the textarea component.
  • Ensured smooth UX with resize-none and auto height resetting.

@vercel
Copy link

vercel bot commented Oct 24, 2025

@gaurav1603 is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

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