Textarea
Takes text that runs past one line, such as notes or an agenda, and grows with it.
Examples
Up to 500 characters, 433 left.
States
This booking has no meals. Add breakfast to tell the kitchen.
Say why the dates changed, so the host can plan the rooms.
Usage
Use it when
- The user writes more than one line: notes, an agenda, a message, a description.
- The text has line breaks that matter, such as one item per line.
Use something else when
- The value is one line: a name, an address, a URL, an amount. Use Input instead; Enter in a textarea adds a line and never submits.
- The value is one of up to 10 known options. Use Select instead.
- The box needs a name, a description or an error. Use Field instead, which holds the Textarea and wires them to it.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/textarea.jsonimport { Textarea } from "@/components/cobalt/ui/textarea"Related
- FileDroptakes files by drop or by a button, and shows each one's upload as it goes.
- InlineEdita value edited where it is read, saved on Enter or when the field is left.
- CopyButtoncopies a long text so a person need not select it.
- Composerwrites a message or a prompt: a field that grows, files, emoji and a send button that says why it waits.
