Composer
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initFieldComposer(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/input-composerAbout this component
A chat composer. The box springs taller line by line as you write (up to a limit, then it scrolls) with the send button riding its bottom edge; the button wakes up as soon as there is text, and sending lifts the message out of the box into the thread above as the box springs back to one line.
Triggers
- Focus
- State change
- Spring
- Morph
Techniques
- Spring
- CSS transition
- State machine
Difficulty
Advanced
Accessibility
Keyboard and screen readers
The textarea is labelled "Message"; Enter sends and Shift+Enter adds a line. The send button is aria-disabled (not disabled) while empty so it stays focusable. The thread is role="log", so new messages are announced.
Reduced motion
The box resizes and messages appear without animation.
Use it in anything you build, commercial and client work included. Licence