View fulldotdev/ui on GitHub

Textarea

Displays a form textarea or a component that looks like a textarea.

Installation

npx shadcn@latest add @fulldev/textarea

Usage

import { Textarea } from "@/components/ui/textarea"
<Textarea placeholder="Type your message here." />

Textarea renders a native textarea that grows with its content (field-sizing-content). Set rows for a taller default height.

Field

Use Field, FieldLabel and FieldDescription to add a label and description.

Disabled

Add disabled to the Textarea and data-disabled to the Field for styling.

Invalid

Add aria-invalid="true" to the Textarea and data-invalid to the Field for styling.

Button

Pair with Button to create a textarea with a submit button.

RTL

Set dir="rtl" on the field or a parent element.

API Reference

Source: src/components/ui/textarea

Textarea accepts all native textarea attributes.