Skip to content

🎉 Material UI v5 is out! Head to the migration guide to get started.

Textarea Autosize

A textarea component for React which grows with content.

The TextareaAutosize component automatically adjust the textarea height on keyboard and window resize events.


<TextareaAutosize aria-label="empty textarea" placeholder="Empty" />

Minimum height

<TextareaAutosize aria-label="minimum height" minRows={3} placeholder="Minimum 3 rows" />

Maximum height

  aria-label="maximum height"
  placeholder="Maximum 4 rows"
  defaultValue="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
      ut labore et dolore magna aliqua."