Preview
Installation
<> import.ts
import { TextArea } from "@/components/ui/textarea"Code
<> component.tsx
import { Textarea } from "@/components/ui/textarea"
<Textarea />API Reference
TextArea
Textarea with optional label and submit button.
<> import.ts
import { TextArea } from "@/components/ui/textarea"Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Field label when isLabel is true |
placeholder | string | "Enter your message..." | Placeholder text |
isLabel | boolean | false | Show label |
isWithButton | boolean | false | Show submit button below |
className | string | "" | Additional CSS classes |
value | string | — | Controlled value |
onChange | (e: React.ChangeEvent<HTMLTextAreaElement>) => void | — | Change handler |
onButtonClick | () => void | — | Button click handler |
buttonText | string | "Submit" | Button label |
disabled | boolean | false | Disable input |
rows | number | 4 | Number of rows |
maxLength | number | — | Max character length |