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.
#
Propsoverrides the value from MessageContext alignment#
Sets if the message should be aligned to right or left side of list.
Type | Default |
---|---|
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.
Type | Default |
---|---|
boolean | true |
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.
Type | Default |
---|---|
component | MessageAvatar |
overrides the value from MessageContext MessageContent#
Component to render content of message including status, attachments, reactions etc., within MessageList
.
Type | Default |
---|---|
component | MessageContent |
overrides the value from MessageContext ReactionList#
Component to render list of reactions at top of message bubble.
Type | Default |
---|---|
component | ReactionList |