# Textarea

- **Section:** Components
- **URL:** https://refast.fastapicloud.dev/docs/components/textarea
- **Markdown:** https://refast.fastapicloud.dev/docs/components/textarea.md
- **Source:** https://github.com/idling-mind/refast-docs/blob/main/docs/pages/components/form_inputs/textarea.py
- **Live examples:** the widgets on this page need a browser; open the URL above to try them.
- **Applies to:** refast 0.12.2

A multi-line text input component with label, description, row sizing, and validation.

```python
from refast.components import Textarea

Textarea(name="bio", placeholder="Tell us about yourself…")
Textarea(
    name="notes",
    label="Notes",
    description="Internal notes — not visible to the customer.",
    rows=5,
    required=True,
    debounce=300,
    on_change=ctx.callback(handle_change),
)
```

```python
Textarea(
    name="demo",
    label="Demo Textarea",
    placeholder="Enter text…",
    rows=3,
    disabled=False,
    required=False,
    error={"None" if not show_error else repr("This field is required.")},
)
```

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `name` | `str \| None` | `None` | HTML name attribute |
| `label` | `str \| None` | `None` | Label text |
| `description` | `str \| None` | `None` | Help text below label |
| `placeholder` | `str` | `""` | Placeholder text |
| `value` | `str \| None` | `None` | Controlled value |
| `default_value` | `str \| None` | `None` | Uncontrolled initial value |
| `rows` | `int` | `3` | Number of visible text rows |
| `required` | `bool` | `False` | Shows required asterisk |
| `disabled` | `bool` | `False` | Disables interaction |
| `error` | `str \| None` | `None` | Error message |
| `debounce` | `int` | `0` | Delay in ms before `on_change` fires |
| `on_change` | `Callback \| None` | `None` | Fired on value change |
| `on_blur` | `Callback \| None` | `None` | Fired on blur |
| `on_focus` | `Callback \| None` | `None` | Fired on focus |
| `on_keydown` | `Callback \| None` | `None` | Fired on key-down |
| `on_keyup` | `Callback \| None` | `None` | Fired on key-up |
| `on_input` | `Callback \| None` | `None` | Fired on every input event |
| `class_name` | `str` | `""` | Extra Tailwind classes |

---

Part of the Refast documentation: [all pages](https://refast.fastapicloud.dev/llms.txt), [everything on one page](https://refast.fastapicloud.dev/llms-full.txt), [search](https://refast.fastapicloud.dev/api/search?q=save_prop).
