# Textarea

> A multi-line text input for longer form content

Status: stable. Added in Components 2.0.0.

A multi-line text input for longer form content.

## Import

```tsx
import { Textarea } from '@oztix/roadie-components'
```

## Examples

### Default

```tsx
<Textarea placeholder='Enter text' />
```

### Emphasis

```tsx
<Textarea emphasis='normal' placeholder='Normal emphasis' />
<Textarea emphasis='subtle' placeholder='Subtle emphasis' />
```

### Sizes

```tsx
<Textarea size='sm' placeholder='Small' />
<Textarea size='md' placeholder='Medium (default)' />
<Textarea size='lg' placeholder='Large' />
```

### Auto resize

Uses CSS `field-sizing: content` to grow with the content. No manual resize
handle. The textarea adjusts automatically.

```tsx
<Textarea autoResize placeholder='This textarea grows as you type...' />
```

### States

Textareas start neutral, gain an accent-coloured border and ring on focus,
and switch to danger colouring when invalid.

```tsx
{/* Default */}
<Textarea placeholder='Click to focus' />
{/* Invalid */}
<Textarea aria-invalid='true' defaultValue='Invalid content' />
{/* Disabled */}
<Textarea disabled placeholder='Disabled' />
```

## Accessibility

- **Label association**: Always pair with a `<label>` (or `Field.Label`) using matching `htmlFor`/`id` attributes.
- **Validation**: Set `aria-invalid="true"` on invalid textareas. `is-interactive-field` provides visual danger styling automatically.
- **Description**: Use `aria-describedby` to link helper or error text to the textarea.

## API reference

### Textarea

```tsx
import { Textarea } from '@oztix/roadie-components/textarea'
```

- `intent`: `"neutral" | "brand" | "brand-secondary" | "brand-blue" | "brand-orange" | "brand-purple" | "accent" | "danger" | "success" | "warning" | "info" | null`. Deprecated: Form controls take their colour from state; `is-interactive-field` handles it. Will be removed in v3.0.0.
- `autoResize`: `boolean`.
- `emphasis`: `"normal" | "subtle" | null`.
- `size`: `"sm" | "md" | "lg" | null`.

Docs updated 19 Oct 2026.
