Skip to main content
Version: v3

MessageSimple

Component to render a message within the MessageList. This component has been well optimized to save un-necessary re-renderings. This is the default component provided to the prop MessageSimple on the Channel component.

Props

overrides the value from MessageContext
alignment

Sets if the message should be aligned to right or left side of list.

TypeDefault
enum('right', 'left')'right'

overrides the value from MessageContext
enableMessageGroupingByUser

Note: This prop is available only in SDK version >= v3.9.0

If false, consecutive messages from same user won't be grouped together.

TypeDefault
booleantrue

overrides the value from MessageContext
groupStyles

Position of message in the group. A message group is a group of consecutive messages from the same user. groupStyles can be used to style the message as per their position in message group.

for example user avatar (to which message belongs to) is only showed for last (bottom) message in group.

Type
array of enum('top', 'bottom', 'middle', 'single')

overrides the value from MessageContext
hasReactions

True if the message has at least 1 reaction.

Type
boolean

overrides the value from MessageContext
message

Message object

Type
object

overrides the value from MessageContext
MessageAvatar

Component to render avatar of sender for message, within MessageList. This component is only rendered for messages from other users.

TypeDefault
componentMessageAvatar

overrides the value from MessageContext
MessageContent

Component to render content of message including status, attachments, reactions etc., within MessageList.

TypeDefault
componentMessageContent

overrides the value from MessageContext
ReactionList

Component to render list of reactions at top of message bubble.

TypeDefault
componentReactionList

Did you find this page helpful?