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

PropTypeDefaultDescription
label
stringField label when isLabel is true
placeholder
string"Enter your message..."Placeholder text
isLabel
booleanfalseShow label
isWithButton
booleanfalseShow submit button below
className
string""Additional CSS classes
value
stringControlled value
onChange
(e: React.ChangeEvent<HTMLTextAreaElement>) => voidChange handler
onButtonClick
() => voidButton click handler
buttonText
string"Submit"Button label
disabled
booleanfalseDisable input
rows
number4Number of rows
maxLength
numberMax character length