Textarea

A multi-line text input field.

Installation

$
npx shadcn@latest add https://ui.mattdowney.com/r/textarea.json

Usage

import { Textarea, TextareaGroup, TextareaGroupControl, TextareaGroupFooter } from "@/components/ui/textarea"

Examples

Default

Multi-line input with a 64px floor. It is full-width like Input, so cap it (max-w-sm here), and it grows by dragging the corner, not by typing.

States

Default, read-only and disabled side by side. Read-only sits flat on the muted fill at full opacity and still takes focus, so its text can be selected and copied; disabled dims to 70% and does not.

A field with its own actions or count in a footer row, under a full-bleed rule: a composer, a reply box, a post. The group draws the field and its states, so TextareaGroupControl renders bare and does not resize. The count is a FieldCounter; point the control's aria-describedby at its id.

59 of 280 characters

A disabled field dims only its text, to 70% like Textarea. The footer is not dimmed: each button keeps its own enabled or disabled look, so Send stays live.