Copy to clipboard
<Textarea placeholder="Type your message here." />
<Textarea placeholder="Type your message here." /><Textarea placeholder="Type your message here." />
Installation
Copy to clipboard
npx bearnie add textarea
npx bearnie add textareanpx bearnie add textarea
bunx bearnie add textarea
bunx bearnie add textareabunx bearnie add textarea
pnpm dlx bearnie add textarea
pnpm dlx bearnie add textareapnpm dlx bearnie add textarea
yarn dlx bearnie add textarea
yarn dlx bearnie add textareayarn dlx bearnie add textarea
Usage
import { Textarea } from "@/components/bearnie/textarea"<Textarea placeholder="Type here..." />Examples
With label
Copy to clipboard
<div class="grid gap-2 w-full max-w-sm">
<Label for="message">Your message</Label>
<Textarea id="message" placeholder="Type your message here." />
</div>
<div class="grid gap-2 w-full max-w-sm">
<Label for="message">Your message</Label>
<Textarea id="message" placeholder="Type your message here." />
</div><div class="grid gap-2 w-full max-w-sm">
<Label for="message">Your message</Label>
<Textarea id="message" placeholder="Type your message here." />
</div>
Disabled
Copy to clipboard
<Textarea disabled placeholder="Disabled" />
<Textarea disabled placeholder="Disabled" /><Textarea disabled placeholder="Disabled" />
With button
Copy to clipboard
<div class="grid gap-2 w-full max-w-sm">
<Textarea placeholder="Type your message here." />
<Button>Send message</Button>
</div>
<div class="grid gap-2 w-full max-w-sm">
<Textarea placeholder="Type your message here." />
<Button>Send message</Button>
</div><div class="grid gap-2 w-full max-w-sm">
<Textarea placeholder="Type your message here." />
<Button>Send message</Button>
</div>
Anatomy
Textarea- A single multi-line input element
Props
Textarea
| Prop | Type | Default | Description |
|---|---|---|---|
| placeholder | string | - | Placeholder text |
| disabled | boolean | false | Disables the textarea |
| required | boolean | false | Makes the field required |
| invalid | boolean | false | Shows error state |
| name | string | - | Form field name |
| id | string | - | Element ID |
| rows | number | 4 | Number of visible rows |
| value | string | - | Textarea value |
| class | string | - | Additional CSS classes |