npx shadcn@4.23.1 add @goop/trail-textareaTextarea
FreeA multi-line field for free text, such as a description or a comment, that grows by rows as a person types, for React and Tailwind CSS. Free, MIT.
What an agent sees
import { Textarea } from '@/components/ui/goop/textarea';
import { Field } from '@/components/ui/goop/field';
<Field label="A note for us" description="Optional" orientation="vertical">
<Textarea placeholder="Anything that helps us prepare" />
</Field>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 text, such as a description or a comment, 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.
npx shadcn@4.23.1 add @goop/trail-textareaAdd the Goop Textarea to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Textarea } from '@/components/ui/goop/textarea';
import { Field } from '@/components/ui/goop/field';
<Field label="A note for us" description="Optional" orientation="vertical">
<Textarea placeholder="Anything that helps us prepare" />
</Field>- Fits: flow (its recipe).
- height, width, padding, corner, border, background, shadow, text, motion: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| variant | default | unstyled | dialog = default | |
| value? | string | |
| defaultValue? | string | |
| onChange? | (event: ChangeEvent<HTMLTextAreaElement>) => void | |
| name? | string | |
| required? | boolean | |
| disabled? | boolean | |
| form? | string | |
| Defaults | rows = 1 |
- Class recipes (cva): textareaVariants (Textarea)
- data-slot values (to select a part by): textarea
Accessibility
- The native element answers the keyboard.
- hover, active, focus-visible: the browser's own (:hover, :active, :focus-visible): write nothing
Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:
| State | Drawn by |
|---|---|
| disabled | the prop disabled |
| invalid | the attribute aria-invalid |
| placeholder-shown | the prop placeholder |
Motion
- The part sets its own motion: add no transition or animation of your own.
- How the theme moves, and how to move your own parts the same way: Motion.
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.