Textarea
A multi-line text field in the Input's surface, wired into Field like Input is.
<Textarea aria-label="Description" placeholder="What this app does" rows={3} />Props
Installation
npx shadcn@latest add https://sproutboat.com/ikada/r/textarea.jsonThe CLI writes components/ikada/textarea.tsx and merges the ikada theme into your CSS. Or take it from the package: import { Textarea } from "@sproutboat/ikada";
Usage
import { Textarea } from "@/components/ikada/textarea";
<Textarea aria-label="Description" placeholder="What this app does" rows={3} />Examples
Shown on the project page.
<Field label="Description" description="Shown on the project page.">
<Textarea rows={3} placeholder="What this app does" />
</Field>Syntax error near FROM.
<Field label="Query" error="Syntax error near FROM.">
<Textarea mono rows={3} defaultValue="select * frm users" />
</Field><Field label="Notes">
<Textarea disabled rows={2} defaultValue="Locked while deploying" />
</Field>Props
| Prop | Type | Description |
|---|---|---|
| className | string | Classes merged onto the root element, after ikada's own. |
| invalid | boolean | Marks the field invalid: danger ring and aria-invalid. Prefer the Field error. |
| mono | boolean | Monospace face for code, SQL and JSON. |
Also takes every prop of Omit<ComponentProps<"textarea">, "className">.
Source: src/components/textarea.tsx