Conversation

Composer

A message field that grows with what you type, and a send button beside it.

Examples

Composer

Anatomy

form.composerTwo columns: the field takes the space, the button sits at the end, aligned to the bottom as the field grows.
> textarea.inputGrows with its content up to eight lines, then scrolls. rows="1" starts it at one line.
> .btnSend. Usually primary and icon-only (data-icon).

Accessibility

  • The placeholder is not a label. Give the <textarea> an aria-label ("Message") or a visible <label>.
  • The icon-only send button needs an aria-label.
  • Growing relies on field-sizing: content; browsers without it keep the rows height and scroll.
KeyEffect
EnterInserts a new line. Sending on Enter is up to your script.
TabMoves from the field to the send button.
Jump to
ProportionFoundations
MaterialFoundations
PresetsFoundations
ShellLayouts · Application
Container and stacksLayouts · Pages
SplitLayouts · Pages
Grid, bento, masonryLayouts · Pages
Switcher and rowLayouts · Pages
↑↓Move↵OpenescClose