跳转到内容

TextareaAutosize API

API documentation for the React TextareaAutosize component. Learn about the available props, and the CSS API.

Import

import TextareaAutosize from '@mui/core/TextareaAutosize';
// 或
import { TextareaAutosize } from '@mui/core';
You can learn about the difference by reading this guide on minimizing bundle size.

属性

Props of the 原生(Native) component are also available.

名称类型默认值描述
maxRowsnumber
| string
Maximum number of rows to display.
minRowsnumber
| string
1
Minimum number of rows to display.

ref 则会被传递到根元素中。

Demos