# Textarea: States

> Disabled, read-only and invalid. Invalid textareas shake when a form submit fails.

Example: https://hextaui.com/docs/textarea/examples/states
Component docs: https://hextaui.com/docs/textarea.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/textarea-states.json
```

This adds `components/examples/textarea/states.tsx` with the Textarea component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/textarea/states.tsx"
import { Textarea } from "@/components/ui/textarea"

export function TextareaStates() {
  return (
    <div className="grid w-full max-w-md gap-4 sm:grid-cols-3">
      <Textarea
        aria-label="Disabled"
        disabled
        placeholder="Disabled"
        minRows={2}
      />
      <Textarea
        aria-label="Read-only"
        readOnly
        defaultValue="Read-only text you can select but not change."
        minRows={2}
      />
      <Textarea
        aria-label="Invalid"
        aria-invalid
        placeholder="Invalid"
        minRows={2}
      />
    </div>
  )
}
```

## Props in this example

### Textarea

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `minRows` | `number` | `3` |  |

## More Textarea examples

- [Send with a shortcut](https://hextaui.com/docs/textarea/examples/submit.md)
- [Character count](https://hextaui.com/docs/textarea/examples/counter.md)
- [Rows](https://hextaui.com/docs/textarea/examples/rows.md)
- [Fixed size](https://hextaui.com/docs/textarea/examples/fixed.md)
- [Right to left](https://hextaui.com/docs/textarea/examples/rtl.md)
