# rc-textarea

> Pretty Textarea react component used in used in ant.design

Latest version **1.10.2** (published 2025-07-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install rc-textarea
pnpm add rc-textarea
yarn add rc-textarea
bun add rc-textarea
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.10.2 |
| Published | 2025-07-29 |
| First published | 2020-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 59.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 33 |
| Maintainers | afc163, zombiej, lixuan, madccc |
| Keywords | react, react-component, react-textarea, textarea, antd, ant-design |

## Links

- npm: https://www.npmjs.com/package/rc-textarea
- Repository: https://github.com/react-component/textarea
- Homepage: https://react-component.github.io/textarea
- Issues: http://github.com/react-component/textarea/issues
- npm.io page: https://npm.io/package/rc-textarea

## Dependencies (5)

- [rc-util](https://npm.io/package/rc-util.md) ^5.27.0
- [rc-input](https://npm.io/package/rc-input.md) ~1.8.0
- [classnames](https://npm.io/package/classnames.md) ^2.2.1
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.10.1
- [rc-resize-observer](https://npm.io/package/rc-resize-observer.md) ^1.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.10.2 (latest) — 2025-07-29
- 1.10.1 — 2025-07-28
- 1.10.0 — 2025-04-11
- 1.9.0 — 2024-12-31
- 1.8.2 — 2024-09-20
- 1.8.1 — 2024-07-18
- 1.8.0 — 2024-07-17
- 1.7.0 — 2024-05-17
- 1.6.3 — 2023-12-18
- 1.6.2 — 2023-12-18
- 1.6.1 — 2023-12-15
- 1.6.0 — 2023-12-14
- 1.5.3 — 2023-11-09
- 1.5.2 — 2023-11-06
- 1.5.1 — 2023-09-28
- … 37 more at https://npm.io/package/rc-textarea/versions

## README

# rc-textarea

[![NPM version][npm-image]][npm-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![npm download][download-image]][download-url] [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![bundle size][bundlephobia-image]][bundlephobia-url]

[npm-image]: http://img.shields.io/npm/v/rc-textarea.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-textarea
[github-actions-image]: https://github.com/react-component/textarea/workflows/CI/badge.svg
[github-actions-url]: https://github.com/react-component/textarea/actions
[codecov-image]: https://img.shields.io/codecov/c/github/react-component/textarea/master.svg?style=flat-square
[codecov-url]: https://codecov.io/gh/react-component/textarea/branch/master
[download-image]: https://img.shields.io/npm/dm/rc-textarea.svg?style=flat-square
[download-url]: https://npmjs.org/package/rc-textarea
[bundlephobia-url]: https://bundlephobia.com/result?p=rc-textarea
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-textarea

Pretty Textarea react component used in [ant.design](https://ant.design).

## Live Demo

https://react-component.github.io/textarea/

## Install

[![rc-textarea](https://nodei.co/npm/rc-textarea.png)](https://npmjs.org/package/rc-textarea)

## Usage

```js
import Textarea from 'rc-textarea';
import { render } from 'react-dom';

render(<Textarea />, mountNode);
```

## API

| Property     | Type                        | Default     | Description                                                                                    |
| ------------ | --------------------------- | ----------- | ---------------------------------------------------------------------------------------------- |
| prefixCls    | string                      | rc-textarea |                                                                                                |
| className    | string                      | ''          | additional class name of textarea                                                              |
| style        | React.CSSProperties         | -           | style properties of textarea                                                                   |
| autoSize     | boolean \| object           | -           | Height autosize feature, can be set to `true\|false` or an object `{ minRows: 2, maxRows: 6 }` |
| onPressEnter | function(e)                 | -           | The callback function that is triggered when Enter key is pressed                              |
| onResize     | function({ width, height }) | -           | The callback function that is triggered when resize                                            |

## Development

```
npm install
npm start
```

## License

rc-textarea is released under the MIT license.

---
_Source: https://npm.io/package/rc-textarea · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
