# 多行输入框 · JGuang UI

> 接收较长的多行文本内容。

- 页面: https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/textarea
- 改编自: shadcn/ui 文档 (MIT) @ bc0705384b51252af26dcc65425b216bf5eb063c
- 说明：正文保留英文原文。

> 示例 `textarea-demo`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/textarea


## Installation


  

**Command**


  

**Manual**


```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```


### Copy and paste the following code into your project.


[View complete source: components/ui/textarea.tsx](/r/jguang-ui/radix/textarea.json)


### Update the import paths to match your project setup.


## Usage

```tsx
import { Textarea } from "@/components/ui/textarea"
```

```tsx
<Textarea />
```

## Field

Use `Field`, `FieldLabel`, and `FieldDescription` to create a textarea with a label and description.


> 示例 `textarea-field`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/textarea


## Disabled

Use the `disabled` prop to disable the textarea. To style the disabled state, add the `data-disabled` attribute to the `Field` component.


> 示例 `textarea-disabled`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/textarea


## Invalid

Use the `aria-invalid` prop to mark the textarea as invalid. To style the invalid state, add the `data-invalid` attribute to the `Field` component.


> 示例 `textarea-invalid`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/textarea


## Button

Pair with `Button` to create a textarea with a submit button.


> 示例 `textarea-button`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/textarea


## RTL

To enable RTL support in JGuang UI, see the [RTL configuration guide](/systems/jguang-ui/docs/rtl).


> 示例 `textarea-rtl`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/textarea

---

JGuang 全部资源索引: https://jiguang132.com/llms.txt
