Skip to main content

Where It Fits

CometChatReactions renders below message bubbles to show emoji reactions. It is typically used inside CometChatMessageBubble as the footer view. The parent (usually CometChatMessageList) owns the reaction add/remove SDK calls and passes the updated message down.
This component is display-only. It renders reaction chips and tooltips but does not call the SDK to add or remove reactions. The parent owns all reaction SDK calls — it handles onReactionClick (to toggle a reaction via the SDK), supplies reactionsRequestBuilder, and passes an updated message prop down after each change. In practice the parent is Message List, which wires these calls for you. For a standalone reactor panel with removal support, use Reaction List.
Live Preview — interact with the reactions component.Open in Storybook ↗

Minimal Render

Root CSS class: .cometchat-reactions

Sub-Components

CometChatReactions is a compound component with these sub-components:

Custom Layout

Compose sub-components to customize the layout:
For a standalone reactor list (the full list of who reacted, with tab filtering and pagination), use the dedicated CometChatReactionList component — it is separate from CometChatReactions.

Actions and Events

Callback Props

onReactionClick

Called when a reaction chip is clicked. The parent (MessageList) handles the SDK call for adding/removing the reaction.

onReactorClick

Called when a user in the reaction list is clicked. Useful for removing own reactions.

onError

Called when an error occurs during reactor detail fetching.

CSS Architecture

The component uses CSS custom properties provided by the UI Kit.

Key Selectors

Example: Custom chip styling

App.css

Props

All props are optional unless noted otherwise.

message

The SDK message object to show reactions for. Required.

alignment

Bubble alignment for positioning the overflow popover.

reactionsRequestBuilder

Custom request builder for fetching reactor details.

hoverDebounceTime

Debounce delay (in milliseconds) before the hover tooltip (Info) appears when hovering a reaction chip.

onReactionClick

Called when a reaction chip is clicked. Parent handles the SDK call.

onReactorClick

Called when a user in the reaction list is clicked.

onError

Error callback for reactor detail fetching failures.

children

Custom sub-components. When omitted, renders the default Bar layout.

className

Optional custom CSS class for the root container.

CSS Selectors