import {
Channel,
ReactionListTop,
ReactionListTopProps,
} from "stream-chat-react-native";
const ReactionListTopWithCustomBackground = (props: ReactionListTopProps) => (
<ReactionListTop {...props} fill="#00DDDD" />
);
<Channel ReactionListTop={ReactionListTopWithCustomBackground} />;ReactionListTop
ReactionListTop displays reactions above a message. This is the default component for the ReactionListTop prop.
Best Practices
- Keep reaction lists compact to avoid covering message content.
- Use
supportedReactionsto keep available reactions consistent. - Avoid heavy logic in press handlers for smooth interactions.
- Use
messageContentWidthfor precise alignment with message bubbles. - Keep reaction sizes consistent across the app.
Basic Usage
Use case: Override the background color on the reaction list container.
Props
alignment
Sets whether the message aligns left or right in the list.
| Type | Default |
|---|---|
| enum('right', 'left') | 'right' |
fill
Background color for reaction list container when alignment is left.
| Type |
|---|
| String |
hasReactions
True if the message has at least one reaction.
| Type |
|---|
| boolean |
messageContentWidth
Width of the message content. Computed in MessageContent after layout, and used to align the reactions to the message edge.
| Type |
|---|
| Number |
onLongPress
Default long press handler for message UI.
| Type |
|---|
| function |
onPress
Default press handler for message UI.
| Type |
|---|
| function |
onPressIn
Default pressIn handler for message UI.
| Type |
|---|
| function |
preventPress
reactions
Reactions added to the message.
[
{
own: true,
type: "love",
},
{
own: false,
type: "haha",
},
];| Type |
|---|
| array |
reactionSize
Reaction icon size.
| Type |
|---|
| Number |
showMessageOverlay
Opens the message action overlay (called on long press).
| Type |
|---|
(showMessageReactions?: boolean) => void |
supportedReactions
List of reactions users can add to messages. See customizing reactions.
| Type | Default |
|---|---|
| Array | reactionData |