You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to set a max height on a TextareaAutosize and then scroll after it reaches that height. But the component hides overflow in the style tag, so it’s impossible.
Activity
[-][base-ui][TextareaAutosize] Support max height[/-][+][TextareaAutosize] Support max height[/+]peterimeokparia commentedon Jan 30, 2025
Helping a brah! Out!!! What I did was the following: Set maxHeight and a Height. The overflow happens after this set height.
<TextareaAutosize
style={{ width: '50rem', maxHeight: 60, height: 60, marginTop: '5%', marginBottom: '2%' }}
aria-label="empty textarea"
placeholder="Prayer Request"
maxRows={1}
required
/>
I hope it helps you out!
Thanks!
ZeeshanTamboli commentedon Sep 28, 2026
I think we can use
maxRowsfor this. For example: