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
alignment
Sets if the message should be aligned to right or left side of list.
Type | Default |
---|---|
enum(‘right’, ‘left’) | ‘right’ |
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.
Type | Default |
---|---|
boolean | true |
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’) |
hasReactions
True if the message has at least 1 reaction.
Type |
---|
boolean |
message
Message object
Type |
---|
object |
MessageAvatar
Component to render avatar of sender for message, within MessageList
. This component is only rendered for messages from other users.
Type | Default |
---|---|
component | MessageAvatar |
MessageContent
Component to render content of message including status, attachments, reactions etc., within MessageList
.
Type | Default |
---|---|
component | MessageContent |
ReactionList
Component to render list of reactions at top of message bubble.
Type | Default |
---|---|
component | ReactionList |