Package: @hexos/react-ui

Message input composer with attachment support and auto-resize.

Provides a WhatsApp-style rounded container with integrated send button and optional file attachments. The textarea automatically resizes based on content using the Textarea primitive.

Supports both controlled and uncontrolled modes via the value and onChange props. When enableAttachments is true, displays a file picker that converts selected files to base64 data URLs for transmission.

Keyboard behavior: Enter submits, Shift+Enter inserts a newline. The send button is disabled when input is empty and no attachments are present.

Example

<InputComposer
  onSubmit={(content, attachments) => sendMessage(content, attachments)}
  placeholder="Type a message..."
  enableAttachments
  maxLength={2000}
/>
function InputComposer(props: InputComposerProps): React.ReactElement

Parameters

props