> For the complete documentation index, see [llms.txt](https://apcom.gitbook.io/altrone-ui/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apcom.gitbook.io/altrone-ui/components/forms/textarea.md).

# Textarea

This component is very similar to [TextInput](/altrone-ui/components/forms/textinput.md) but allows to enter multiline text. Also user can change height of the Textarea through special handle in the right bottom corner.&#x20;

```tsx
import { Textarea } from 'altrone-ui';

const [value, setValue] = useState('');

return <Textarea 
    value={value} 
    onChange={setValue} 
/>
```

## Properties

| Property                                              | Type                                                | Description                                                      |
| ----------------------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------- |
| **`value`**<mark style="color:red;">**`*`**</mark>    | `string`                                            | Inputed value                                                    |
| **`onChange`**<mark style="color:red;">**`*`**</mark> | `(value: string) => void`                           | Callback is called when user changed the value in the text field |
| **`placeholder`**                                     | `string`                                            | Placeholder of the input                                         |
| **`errorText`**                                       | `string`                                            | Error message for Textarea                                       |
| **`hintText`**                                        | `string`                                            | Hint message for Textarea                                        |
| **`size`**                                            | [`Size`](/altrone-ui/utils/enums/size.md)           | Size of the Textarea                                             |
| **`disabled`**                                        | `boolean`                                           | Marks textarea as disabled                                       |
| **`required`**                                        | `boolean`                                           | Marks textarea as required                                       |
| **`surface`**                                         | [`Surface`](/altrone-ui/utils/enums/surface.md)     | Surface of the textarea                                          |
| **`elevation`**                                       | [`Elevation`](/altrone-ui/utils/enums/elevation.md) | Shadows of the textarea                                          |
| **`className`**                                       | `string`                                            | Custom CSS class                                                 |

## History

* **`Altrone 2.0`**:
  * added `surface` prop
  * added `elevation` prop
* **`Altrone 1.0`**: initial release
