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.
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