# Textarea

<FrameworkCodeSwitcher>
  <div slot="astro">
```astro
---
import { Textarea } from "@/components/starwind/textarea";
---

<Textarea placeholder="Type something..." />
```
  </div>
  <div slot="react">
```tsx
import { Textarea } from "@/components/starwind/textarea";

export function Example() {
  return (
    <>
      <Textarea placeholder="Type something..." />
    </>
  );
}
```
  </div>
</FrameworkCodeSwitcher>

## Installation

```bash
npx starwind@latest add textarea
```

## Usage

### size

```astro
---
import { Textarea } from "@/components/starwind/textarea";
---

<Textarea size="sm" placeholder="Small textarea" />
<Textarea size="md" placeholder="Medium textarea" />
<Textarea size="lg" placeholder="Large textarea" />
```

### disabled

```astro
---
import { Textarea } from "@/components/starwind/textarea";
---

<Textarea disabled placeholder="Disabled textarea" />
```

## Framework Availability
Textarea is available for Astro and React.
Astro available; React available
| Framework | Status | Notes |
| --- | --- | --- |
| Astro | available | - |
| React | available | - |
## API Reference
### Textarea
| Prop | Type | Required | Default | Kind | Description |
| --- | --- | --- | --- | --- | --- |
| `size` | `"sm" \| "md" \| "lg"` | No | `"md"` | Styled variant | Selects the component's visual size. |
- Inherits textarea attributes. Omits `children`.

## Changelog

### v1.4.0

- Added contract-generated Astro and React implementations while preserving the component's existing public API and styling.

### v1.3.3 

- Refactor tailwind variants functions into separate `variants.ts` file

### v1.2.2

- Refactor tailwind variants functions into separate `variants.ts` file

### v1.2.1 

- add `aria-invalid` styling

### v1.2.0 

- Add a `data-slot` attribute to all components to enable global styling updates

### v1.1.1 

- Adjust component to use type `VariantProps` from `tailwind-variants`. This provides greater type safety and cleans up component frontmatter.

### v1.1.0

- `tailwind-variants` now implemented. This uses `tailwind-merge` under the hood to merge Tailwind classes without style conflicts, allowing you to override any existing classes using the "class" prop.