Skip to content
+

Textarea Autosize

The Textarea Autosize component gives you a textarea HTML element that automatically adjusts its height to match the length of the content within.

TextareaAutosize API

Import

import { TextareaAutosize } from '@mui/base/TextareaAutosize';
// or
import { TextareaAutosize } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

Props

maxRows

Maximum number of rows to display.

Type:number
| string


minRows

Minimum number of rows to display.

Type:number
| string

Default:1



The ref is forwarded to the root element.