Description of icon
Flex UI
API Reference

MessageBubble

This component renders a single bubble in a list of messages.


Component children#

KeyComponentConditionAlignDescription
headerstyled(div)
Wrapper for message bubble header. It displays the user name and the time
bodystyled(div)
Wrapper for the message body. Parses to markdown if markdown support is enabled
media-bodyReact component
Visible only when message source type is media and when file attachment is enabled
Wrapper for media message
media-errorstyled(div)
Visible only when a media message needs to be displayed by it is not supported
Wrapper that displays a text notifying the agent media messages are not supported

Static Properties#

NameTypeDescription
ContentDynamicContentStore<MessageBubble.MessageBubbleProps>

Dynamic content store

Component Properties#

NameTypeDescriptionOptionalDefault
conversationSidstring

The conversation sid.

No
messageMessageState

An object which represents a single message.

No
participantParticipantState

An object defining the properties of a remote client.

Yes
messageStyleMessageStyle

Identifies how the message should be displayed.

Yes
useFriendlyNameboolean

An override to use the friendly name passed in participant.

Yestrue
authorNamestring

A custom author name to be used.

Yes
hasMarkdownSupportboolean

If set to true, the body will be parsed as markdown.

Yes
timestampFormatterfunction

Function that formats timestamp.

Yes
inFocusboolean

Determines whether a message bubble is in focus.

No

Component Children Properties#

NameTypeDescriptionOptionalDefault
isParticipantOfConversationboolean

Represents if user is a participant of the conversation

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.