Skip to content

🎉 v5 beta is out! Head to the v5 documentation to get started.

TextareaAutosize API

The API documentation of the TextareaAutosize React component. Learn more about the props and the CSS customization points.

Import

import TextareaAutosize from '@material-ui/core/TextareaAutosize';
// or
import { TextareaAutosize } from '@material-ui/core';

You can learn more about the difference by reading this guide.

Props

Name Type Default Description
maxRows number
| string
Maximum number of rows to display.
minRows number
| string
1 Minimum number of rows to display.
rows oneOfType([PropTypes.number Deprecated. Use rowsMin instead.

Minimum number of rows to display.
rowsMax oneOfType([PropTypes.number Deprecated. Use maxRows instead.

Maximum number of rows to display.
rowsMin oneOfType([PropTypes.number Deprecated. Use minRows instead.

Minimum number of rows to display.

The ref is forwarded to the root element.

Any other props supplied will be provided to the root element (native element).

Demos