---
metaTitle: Textarea component | AwesCode UI
meta:
  - name: description
    content: The &lt;AwTextarea /&gt; component is used to render Textarea - UI Vue component for AwesCode UI.
title: Textarea
---

# Textarea

**Category:** Molecule | **Import:** Global

The `AwTextarea` component is a multi-line text input with automatic height adjustment and label support.

## Overview

`AwTextarea` provides a styled textarea input with automatic height adjustment based on content. It extends the text field mixin for consistent styling and error handling.

## Usage

### Basic Example

```markup
<AwTextarea v-model="message" placeholder="Enter message" />
```

### With Label

```markup
<AwTextarea 
    v-model="description" 
    label="Description"
    placeholder="Enter description"
/>
```

### With Error

```markup
<AwTextarea 
    v-model="text"
    label="Required field"
    :error="errorMessage"
/>
```

## API

### Props

All props from `TextFieldMixin` are supported, including:

| Name | Description | Type | Required | Default |
|------|-------------|------|----------|---------|
| label | Field label | `String` | `false` | - |
| value | Textarea value | `String` | `false` | - |

All standard HTML textarea attributes are supported via `$attrs` (e.g., `placeholder`, `rows`, `disabled`, `required`, `maxlength`).

### Slots

| Name | Description | Props | Default Slot Content |
|------|-------------|-------|---------------------|
| error | Custom error display | - | Default error tooltip |

### Events

All standard textarea events are supported (e.g., `input`, `focus`, `blur`, `change`).

## Related Components

- `AwInput` - Single-line text input
- `AwDescriptionInput` - Input with description
- `AwForm` - Form component

## Notes

- **Import Method:** Global - Available as molecule component
- Extends `TextFieldMixin` for common field functionality
- Automatically adjusts height based on content using autosize library
- Height adjustment happens on mount and when content changes
- Supports error states with tooltip display
- Use for multi-line text input in forms
