Skip to main content

Reactions

The CometChatReactions component is used to display a list of reactions to a specific message. Users can see who has reacted to the message and with what emoji.

Image

Properties

PropertiesTypeDescription
messageObjectCometChat.BaseMessageThe message to display reactions for.
reactionsStyleReactionsStyleThe style for the reactions component.
alignmentMessageBubbleAlignmentThe alignment of the reactions component.
reactionListConfigurationReactionListConfigurationThe configuration for the reaction list.
reactionInfoConfigurationReactionInfoConfigurationThe configuration for the reaction information.
hoverDebounceTimenumberThe delay before the hover effect is applied.
reactionClickFunctionThe function to call when a reaction is clicked.

Usage

<cometchat-reactions
messageObject={messageObject}
reactionsStyle={reactionsStyle}
alignment={alignment}
reactionListConfiguration={reactionListConfiguration}
reactionInfoConfiguration={reactionInfoConfiguration}
hoverDebounceTime={hoverDebounceTime}
reactionClick={reactionClick}
/>

ReactionsStyle

ReactionsStyle is a class containing attributes to customize the appearance of the CometChatReactions component.

AttributesTypeDescription
heightstringThe height of the reactions component.
widthstringThe width of the reactions component.
borderRadiusstringThe border radius of the reactions component.
borderstringThe border of the reactions component.
backgroundstringThe background color of the reactions component.
reactionBoxShadowstringThe box shadow of the reaction.
barPaddingstringThe padding of the reaction bar.
reactionBorderRadiusstringThe border radius of the reaction.
reactionBackgroundstringThe background color of the reaction.
activeReactionBorderstringThe border of the active reaction.
activeReactionBackgroundstringThe background color of the active reaction.
reactionEmojiFontstringThe font of the reaction emoji.
reactionEmojiFontColorstringThe font color of the reaction emoji.
reactionCountTextFontstringThe font of the reaction count text.
reactionCountTextColorstringThe color of the reaction count text.
baseReactionBackgroundstringThe base background color of the reaction.