Skip to content

[TextareaAutosize] Support max height #43719

Open

Description

@michaldudak

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.

Search keywords:

Search keywords:

Activity

  1. self-assigned this
    on Jan 19, 2024
  2. changed the title [-][base-ui][TextareaAutosize] Support max height[/-] [+][TextareaAutosize] Support max height[/+] on Feb 27, 2024
  3. added
    type: bug
    on Feb 27, 2024
  4. peterimeokparia commented on Jan 30, 2025

    @peterimeokparia

    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!

  5. added
    scope: text field
    component: TextareaAutosize
    and removed
    scope: text field
    on Aug 16, 2025
  6. ZeeshanTamboli commented on Sep 28, 2026

    @ZeeshanTamboli
    Member

    I think we can use maxRows for this. For example:

    <TextareaAutosize maxRows={8} minRows={3} />
  7. added
    has workaround
    on Sep 28, 2026
  8. removed
    type: bug
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: TextareaAutosizehas workaroundscope: text field

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions