Description of icon
Flex UI
API Reference

MessageListItem

Represents a single message in a message list. Can be themed with Theme.Chat.MessageListItem in Theme.


Component children#

KeyComponentConditionAlignDescription
contentdiv
Wrapper for message content. Displays the avatar of the author and the message in a MessageBubble component
media-transfer-errorstyled(div)
Visible if message.error prop is true
Wrapper for message shown when message failed to be sent. Displays a AlertSmall icon and MediaMessageTransferFailed template
read-statusstyled(div)
Wrapper for read status. Displays Read template and Read icon

Static Properties#

NameTypeDescription
ContentDynamicContentStore<MessageListItem.MessageListItemProps, MessageListItemChildrenKeys>

Dynamic content store

BubbleMessageBubble

Shortcut for MessageBubble component

Component Properties#

NameTypeDescriptionOptionalDefault
conversationSidstring

Sid of the conversation.

No
messageMessageState

An object which represents a single message.

No
showReadStatusboolean

Should show read status.

Yes
messageStyleMessageStyle

Identifies how the message should be displayed.

Yes
useFriendlyNameboolean

An override to use the friendly name passed in member.

Yestrue
authorNamestring

A custom author name to be used.

Yes
avatarUrlstring

Url to the avatar of the author.

Yes
hasMarkdownSupportboolean

Whether Markdown feature is enabled or not

Yes
participantobject

Object containing a pre-defined participant name.

Yes
participant.friendlyNamestring

Predefined participant name.

No
memberobject

Object containing a pre-defined author name.

Yes
member.friendlyNamestring

Predefined author name.

No
timestampFormatterfunction

A custom formatter for the message timestamp. Takes a Date argument and returns string.

No
focusableboolean

Whether the the MessageListItem can be focused

No
updateFocusfunction

A helper function to inform parent components of currently focused item

No
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.