Elements

Components / Forms

Textarea

A multi-line text input that auto-grows with its content. Pair it with a Field for labels and errors.

Installation

bash
npx shadcn add https://raw.githubusercontent.com/levi-putna/elements/main/registry/textarea/registry.json

Basic

Textarea
tsx
import { Textarea } from "@/components/ui/textarea"

<Textarea placeholder="Add a note for the committee…" />

In a field

Field + Textarea

Markdown is supported.

tsx
import { Field, FieldLabel, FieldDescription } from "@/components/ui/field"
import { Textarea } from "@/components/ui/textarea"

<Field>
  <FieldLabel hint="Visible to all committee members.">Meeting notes</FieldLabel>
  <Textarea placeholder="Add a note…" />
  <FieldDescription>Markdown is supported.</FieldDescription>
</Field>

Textarea props

PropTypeDefaultDescription
disabledboolean-Dims the textarea and blocks interaction.
aria-invalidboolean-Applies the destructive border and ring for error states.
rowsnumber-Initial visible rows (auto-grows with field-sizing).