Composer

Did the build pass?
All green. Shipping now
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-composer

About 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

More inputs

See all
Drop LettersGet code
Ghost CompleteGet code

Handle CheckGet code
Lens SearchGet code