Textarea
A multiline text input field
A textarea component for multiline text input, visually aligned with the Input component.
import { Textarea } from "@/components/ui/textarea";
export default function Example() {
return (
<Textarea
placeholder="Write your message here"
rows={4}
/>
);
}
View Code
Installation
bash
liminal add textarea
Usage
import { Textarea } from "@/components/ui/textarea";
export default function Example() {
return (
<Textarea
placeholder="Write your message here"
rows={4}
/>
);
}
View Code
Examples
Error state
Use aria-invalid="true" to show error styling, consistent with Input.
import { Textarea } from "@/components/ui/textarea";
export default function Example() {
return (
<Textarea
placeholder="Write your message here"
aria-invalid="true"
/>
);
}
View Code
API
| Prop | Type | Default | Description |
|---|---|---|---|
| rows | number | - | Number of visible text rows. |
| placeholder | string | - | Placeholder text when empty. |
| aria-invalid | boolean | - | Set to true to show error border and styling. |