| 1 |
--- |
| 2 |
id: Text area |
| 3 |
section: components |
| 4 |
subsection: forms |
| 5 |
cssPrefix: pf-v6-c-form-control |
| 6 |
propComponents: ['TextArea'] |
| 7 |
--- |
| 8 |
|
| 9 |
import { Fragment, useRef, useState } from 'react'; |
| 10 |
|
| 11 |
## Examples |
| 12 |
|
| 13 |
### Basic |
| 14 |
|
| 15 |
```ts file="./TextAreaBasic.tsx" |
| 16 |
|
| 17 |
``` |
| 18 |
|
| 19 |
### Invalid |
| 20 |
|
| 21 |
```ts file="./TextAreaInvalid.tsx" |
| 22 |
|
| 23 |
``` |
| 24 |
|
| 25 |
### Validated |
| 26 |
|
| 27 |
```ts file="./TextAreaValidated.tsx" |
| 28 |
|
| 29 |
``` |
| 30 |
|
| 31 |
### Vertically resizable |
| 32 |
|
| 33 |
```ts file="./TextAreaVerticallyResizable.tsx" |
| 34 |
|
| 35 |
``` |
| 36 |
|
| 37 |
### Horizontally resizable |
| 38 |
|
| 39 |
```ts file="./TextAreaHorizontallyResizable.tsx" |
| 40 |
|
| 41 |
``` |
| 42 |
|
| 43 |
### Not resizable |
| 44 |
|
| 45 |
```ts file="./TextAreaResizableNone.tsx" |
| 46 |
|
| 47 |
``` |
| 48 |
|
| 49 |
### Uncontrolled |
| 50 |
|
| 51 |
```ts file="./TextAreaUncontrolled.tsx" |
| 52 |
|
| 53 |
``` |
| 54 |
|
| 55 |
### Disabled |
| 56 |
|
| 57 |
```ts file="./TextAreaDisabled.tsx" |
| 58 |
|
| 59 |
``` |
| 60 |
|
| 61 |
### Read only |
| 62 |
|
| 63 |
```ts file="./TextAreaReadOnly.tsx" |
| 64 |
|
| 65 |
``` |
| 66 |
|
| 67 |
### Auto resizing |
| 68 |
|
| 69 |
```ts file="./TextAreaAutoResizing.tsx" |
| 70 |
|
| 71 |
``` |