Docs

Message Input

Message Input allows users to author and send messages.

Message Input allows users to author and send messages.

Source code
MessageInputComponent.java
message-input-component.tsx
message-input-component.ts

The user can send the message with one of the following actions:

  • by pressing Enter (use Shift+Enter to add a new line)

  • by clicking the “send” button.

Use the Message List component to show messages that users have sent.

Source code
MessagesBasic.java
message-basic.tsx
message-basic.ts

Disabling Submit

Submitting can be disabled while the input field stays editable. Use this, for example, to prevent the user from sending a message while a file is still uploading. Setting the submitDisabled property (setSubmitDisabled() in Flow) disables the send button, and pressing Enter no longer submits the message. The typed text stays in the input field, and unlike in a disabled Message Input, the user can keep typing.

Source code
MessageInputSubmitDisabled.java
message-input-submit-disabled.tsx
message-input-submit-disabled.ts
Component Usage recommendations

Message List

Show a list of messages.

F69B472B-4E0A-4593-9A6C-5E57B417B1FE

Updated –