Description of icon
Flex UI
API Reference

MessageList

A component representing the list of messages. Can be themed with Theme.Chat.MessageList in Theme.


Component children#

KeyComponentConditionAlignDescription
typing-indicatorReact component
Visible when one or more participants are typing and the showTypingIndicator prop is set to true
Typing indicator component. Displays TypingIndicator template when one participant is typing and TypingIndicatorMultiple template when multiple participants are typing
Twilio-WelcomeMessageReact component
Welcome message component. Displays an icon (MessageBold) and a welcome message text
predefinedMessageMessageListItem
Visible if predefinedMessage prop is provided
Initial message in the ChatWidget
message-loadingReact component
Visible if provided conversation.isLoadingMessages property is true and there are messages to be loaded
Loading spinner component displayed when loading messages
message-scroll-buttonReact component
Visible if provided conversation.showScrollDownBtn property is true and conversation.unreadMessages array is a non-empty
Button component for scrolling to the last unread message
new-message-separatorReact component
Visible if there are unread messages displayed
New message separator component. Displays a line wrapping some text above the latest unread message
date-separatorReact component
Visible if messages are received on different dates
Date separator component. Displays a line wrapping a date string above the first message that is received on a new date

Static Properties#

NameTypeDescription
ContentDynamicContentStore<MessageList.MessageListChildrenProps>

Dynamic content store

ItemMessageListItem

Shortcut for MessageListItem component

WelcomeMessageWelcomeMessage

Shortcut for WelcomeMessage component

defaultPropsMessageList.MessageListChildrenProps

Default properties

Component Properties#

NameTypeDescriptionOptionalDefault
conversationSidstring

Sid of the conversation.

No
memberDisplayOptionsMemberDisplayOptions

Chat member display configuration.

No
messageStyleMessageStyle

Represents the style of a message.

No
showTypingIndicatorboolean

It sets whether to display the TypingIndicator component or not.

No
showReadStatusboolean

It sets whether to display the MessageReadContainer component or not.

No
showWelcomeMessageboolean

It sets whether to inject a WelcomeMessage in the message list or not.

No
predefinedMessagePredefinedMessage

It sets whether to inject a predefined message in the message list or not.

Yes
listContainerAriaPropsAriaProps

ListContainer aria props.

Yes
notVisibleboolean

Determines visibility.

Yes
conversationTypestring

Conversation Type.

Yes

Component Children Properties#

NameTypeDescriptionOptionalDefault
conversationSidstring

Sid of the conversation

No
conversationConversationState.ConversationState

ConversationState object

No
isAppActiveboolean

It sets whether the chat is active or not

Yes
memberDisplayOptionsMemberDisplayOptions

Chat member display configuration

No
messageStyleMessageStyle

Represents the style of a message.

No
showTypingIndicatorboolean

It sets whether to display TypingIndicator component or not

No
showReadStatusboolean

It sets whether to display the MessageReadContainer component or not

No
showWelcomeMessageboolean

It sets whether to inject a WelcomeMessage in the message list or not

No
predefinedMessagePredefinedMessage

It sets whether to inject a predefined message in the message list or not

Yes
listContainerAriaPropsAriaProps

ListContainer aria props

Yes
Rate this page

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.