A textarea that grows as you type, with a character meter and a Cmd+Enter submit shortcut. For composers.
Textarea playground
Install Textarea
1. New project? One command installs the package and wires everything - see Installation:
pnpm dlx zyncat-ui init2. Import the component - it loads its own stylesheet:
import { Textarea } from '@zyncat/ui/textarea';Usage
import { Textarea } from '@zyncat/ui/textarea'; <Textarea label="Announcement" max={280} minRows={3} onSubmit={handleSubmit} hint="Cmd+Enter to submit" />Compose Textarea in your application. No Tailwind or external styling library is required; every value resolves from Zyncat UI's token vocabulary.
Textarea props
Textarea
Frequently asked questions
Yes - it starts at minRows (default 3) and grows on every keystroke up to maxRows (default 10), then switches to an internal scrollbar. A ResizeObserver also re-measures it whenever the field's own width changes, such as a sidebar collapsing.
Pass onSubmit - it fires with the current text on Cmd+Enter or Ctrl+Enter, and the keystroke is prevented from inserting a newline. Pair it with hint="Cmd+Enter to submit" to surface the shortcut in the footer.
No - max is a soft limit. Past it, the extra characters get a danger-tinted highlight and underline right in the text and the ring meter turns red, but nothing is truncated; for a hard stop, forward the native maxLength through htmlProps.
It turns amber once warnAt characters remain (default 20), and switches to the danger color once you're past max. The count itself also flips from 'count / max' to a plain countdown of characters left as soon as you enter the warning zone.