Theme
Install with your agentnpx shadcn@4.23.1 add @goop/meadow-textarea

Textarea

Free

A multi-line field for free words, such as a task's notes, a description, a comment or a message, that grows by rows as a person types, for React and Tailwind CSS. Free, MIT.

Type several lines and watch it grow; switch every look, long words, disabled and invalid. Nothing is sent.

When to use

  • A multi-line field for free words, such as a task's notes, a description, a comment or a message, that grows by rows as a person types.
  • Also called: multiline text input.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Textarea on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.

Terminal
npx shadcn@4.23.1 add @goop/meadow-textarea
PROMPT
Add the Goop Textarea to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { useState } from 'react';
import { Textarea } from '@/components/ui/goop/textarea';

function TaskNotes({ onSave }: { onSave: (notes: string) => void }) {
  const [notes, setNotes] = useState('');
  return (
    <div className="flex flex-col gap-2 w-80">
      <label htmlFor="task-notes" className="text-sm font-medium">
        Notes
      </label>
      <Textarea
        id="task-notes"
        placeholder="Add a note for the crew"
        rows={3}
        value={notes}
        onChange={(event) => setNotes(event.target.value)}
        onBlur={() => onSave(notes)}
      />
    </div>
  );
}

function VisitReport({ report, error }: { report: string; error?: string }) {
  return <Textarea aria-label="Visit report" defaultValue={report} aria-invalid={error ? true : undefined} />;
}

function CrewInstructions() {
  return <Textarea aria-label="Instructions for the crew" counter maxLength={2000} rows={5} />;
}

function DraftMessage() {
  return <Textarea variant="bare" aria-label="Message" defaultValue="Bring gloves on Saturday." />;
}

function TodoCardNotes() {
  return <Textarea variant="dialog" aria-label="Notes" placeholder="Add a note" className="-mx-1" />;
}
  • Fits: flow (its recipe).
  • Its look is its own: a className places it (width, margin, flex or grid place), never restyles it; with counter it places the field and its count together. An action beside the field is the caller's, in a wrapper element round it.
  • width, padding, corner, background, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
variantdefault | bare | unstyled | dialog = default
counter?boolean = falseShows the count of characters written against maxLength in the field's foot corner; false by default.
value?string
defaultValue?string
onChange?(event: ChangeEvent<HTMLTextAreaElement>) => void
name?string
required?boolean
disabled?boolean
form?string
Defaultsrows = 1
  • Class recipes (cva): textareaVariants (Textarea)
  • data-slot values (to select a part by): textarea, textarea-counter, textarea-frame

Accessibility

  • The native element answers the keyboard.
  • hover, focus: the browser's own (:hover, :focus): write nothing

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
focus-visiblethe attribute data-focus-visible
disabledthe prop disabled
invalidthe attribute aria-invalid
placeholder-shownthe prop placeholder

Motion

  • The part sets its own motion: add no transition or animation of your own.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/meadow/components/textarea.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add @goop/meadow-textarea

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.