Composer

Where the person talks back

The chat input shell: a context note, an attachments row, an auto-growing textarea, a leading actions slot, and a teal send button. Send is the one primary CTA in the chat set, so it is the one place the action colour appears. While a response streams, send becomes stop and Enter goes inert.

The shell

The shell is the control. The textarea inside is borderless, so the border carries hover and focus for the whole surface. Enter sends, Shift and Enter breaks the line, and whitespace alone never sends. Submitting reports the value but does not clear it; the consumer owns the value and empties it after a successful send.

Send and stop

While a response streams, the send button becomes a stop button and submitting is blocked, so a person can never fire a message into a running answer. On a glowing composer the gradient ring also stays lit and keeps turning while the agent works, focus or not. Try it: send something and the demo streams for a few seconds.

Idle. Type a message and send it.

AI glow

With aiGlow, focusing the composer replaces the plain selected border with AiButton's signature: the glow blooms out of the send corner and the ring fades up a beat behind it, the system's signal that a model answers here. Blur collapses it back. Off by default; the site chat turns it on. Click into the field to see it.

Context

The context prop pins a quiet, non-interactive note to the top of the shell, telling the person what the model can see. The site chat uses it to name the page you are reading. An optional contextIcon puts a Material Symbol at its left. The note is one line: a long one clips with an ellipsis, a short one carries no trailing dots.

Looking at “Release notes”
Looking at “A quarterly planning document with a title long enough to run out of room”

Attachments

The attachments row renders whatever the caller passes, DocumentChips by intent. The list is fully controlled, the same philosophy as FileInput: the composer never owns the files, it only shows them.

launch-brief.pdf
costs-q3.xlsx
kickoff-deck.pptx

Growth

The textarea starts at one row and grows with its content up to maxRows, eight by default, then scrolls internally. This one is capped at four rows; add lines to feel the cap.

The full footer

The intended stack: a PromptSuggestions row above the composer, with a leading action for attachments. Tapping a suggestion fills the input; sending clears it.

Nothing sent yet.