Use this context for message-level UI concerns, not global channel state. Prefer the provided handlers (handleEdit, handleDelete, etc.) to keep behavior consistent. Avoid heavy logic in handlers that can trigger list-wide re-renders. Use removeMessage/updateMessage only for local UI state, not server-side mutations. Keep messageActions and supportedReactions stable (memoized) for performance.
ID of the current channel.
Controls visibility of deleted messages in the channel.
always: Visible to both sender and receiver.never: Visible to no one.sender: Visible only to the sender.receiver: Visible only to the receiver.Type enum('always', 'never', 'receiver', 'sender')
Custom handler invoked when a message swipe action is triggered. Use it to override the default swipe-to-reply behavior.
Delete a message using the channel state updater.
Delete a reaction from a message.
Disable the typing indicator in MessageList.
Dismiss the keyboard when the user touches a message in the list.
Note: Available in SDK version >= v3.9.0 .
If false, consecutive messages from the same user won’t be grouped.
The type of URL preview to render.
Type Default 'compact' | 'full''full'
If true, users can swipe to reply to a message.
Forces all messages to align left or right. By default, received messages are left and sent messages are right.
Type Default 'left' | 'right' | false false
Override how message groups are styled and grouped in MessageList.
Format function for dates in message status and deleted message components.
Parameter Description date date to format provided as a string, Date , or number (Unix Timestamp)
Called when the Ban User action is triggered. It does not override default behavior. See customize message actions .
Parameter Description message message the action is called on
Called when the Copy Message action is triggered. It does not override default behavior. See customize message actions .
Parameter Description message message the action is called on
Called when the Delete Message action is triggered. It does not override default behavior. See customize message actions .
Parameter Description message message the action is called on
Called when the Delete Message for me action is triggered. It does not override default behavior. See customize message actions .
Parameter Description message message the action is called on
Called when the Edit Message action is triggered. It does not override default behavior. See customize message actions .
Parameter Description message message the action is called on
Called when the Flag Message action is triggered. It does not override default behavior. See customize message actions .
Parameter Description message message the action is called on
Called when the Mute User action is triggered from the message actions list. It does not override default behavior. See customize message actions .
Parameter Description message message the action is called on
Called when the Mark Unread action is triggered.
Called when the Pin/Unpin Message action is triggered.
Called when the Reply action is triggered. It does not override default behavior. See customize message actions .
Parameter Description message message the action is called on
Called when a reaction is selected in the message menu (add or remove). It does not override default behavior. See customize message actions .
Parameter Description messageMessage the action is called on. reactionTypeString designating the type of reaction.
Called when the Retry action is triggered. It does not override default behavior. See customize message actions .
Parameter Description message message the action is called on
Called when the Thread Reply action is triggered. It does not override default behavior. See customize message actions .
Parameter Description message message the action is called on
Called when the Block User action is triggered.
Returns whether a message should be treated as AI-generated for message rendering.
Load the channel starting at the first unread message.
Returns true if rendering nextAttachment would produce the same result as prevAttachment, otherwise false.
Parameter Description prevAttachment previous message attachment to be compared nextAttachment next message attachment to be compared
Rules for simple-markdown .
An array of actions, or a function returning an array, shown in the message menu. See customize message actions .
Parameter Description actionInfoAn object containing the original actions and relevant message data
Order for rendering message content.
Type Default array ['quoted_reply', 'gallery', 'files', 'text', 'attachments']
Quoted message used by reply-related UI in the message list.
Theme applied to the current user’s messages.
Memoize this object or pass a stable reference.
Defines the hitSlop area for the message swipe-to-reply gesture.
Type Default Object{ top: number, left: number, bottom: number, right: number } {left: screenWidth, right: screenWidth}
Number of lines for message text in the Message Overlay.
Called when a user long-presses a message. The default opens the message menu.
Parameter Description payload { actionHandlers, message }
Called on touch start, before onPressMessage .
Parameter Description payload { actionHandlers, message }
Called when a user presses a message.
The default handler behaves differently for reactions and attachments. Handle those cases if you override it.
Parameter Description payload { additionalInfo, actionHandlers, message }
additionalInfo provides extra data for certain emitters (for example, user details for textMention).
For example:
< Channel
onPressMessage = { ({ additionalInfo , defaultHandler , emitter }) => {
if ( emitter === 'textMention' ) {
console . log ( additionalInfo ?. user );
return ;
}
if ( emitter === 'urlPreview' || emitter === 'textLink' ) {
console . log ( additionalInfo ?. url );
return ;
}
if ( emitter === 'fileAttachment' ) {
console . log ( additionalInfo ?. attachment );
return ;
}
defaultHandler ?.();
} }
> additionalInfo may change as we add more emitter use cases.
Position of the reaction list in the message component. Default is above the message content.
Type Default value top | bottom'top'
Remove a message from local state only (does not call channel.deleteMessage).
Renders a preview of the parent message for quoted replies.
Type Default ComponentType Reply
Retry sending a failed message.
Send a reaction for the target message.
Full override of the message reaction handler. It must return a function that accepts reactionType (string). See customize message actions .
Parameter Description message message the action is called on
Set editing state for a message.
Set quoted-reply state for a message.
Enable/disable the unread underlay background in the message list.
Type Default boolean|undefinedtrue
ID of the highlighted message. Defaults to undefined and resets after the highlight timeout.
Upsert a message in local state. Does not call channel.sendMessage (used for optimistic updates).
Called when the poll creation button is clicked in the attachment picker. Use it to override the default modal UI.
If overridden, a payload is passed with sendMessage from MessageInputContext for use in CreatePoll .
Parameter Description payload { sendMessage }
Controls whether the poll creation button is visible.
Renders attachments in MessageList.
Available props:
Renders additional attachment actions (for example, Giphy send/shuffle/cancel).
Renders the audio attachment.
Renders the sticky date header in MessageList.
Renders file attachments in MessageList.
Renders a group of file attachments when a message has multiple files.
Renders the file icon for file attachments.
Preview component used to render file icon, title, and metadata.
FlatList component used by MessageList.
Renders image attachments in MessageList.
Renders Giphy attachments in MessageList.
Type Default ComponentType Giphy
Giphy image version to render. See the Image Object keys for options.
Type Default string 'fixed_height'
Renders the indicator shown when an image fails to load.
Renders the loading indicator while an image is loading.
Renders inline date separators between messages more than a day apart.
Renders an inline separator in MessageList to mark the last read message.
Renders the message action list in the message menu.
Renders a message action item within the action list.
Renders the sender avatar in MessageList . Only shown for other users’ messages.
Renders blocked-message UI in MessageList.
Renders the bounce action handler for bounced messages in MessageList .
Renders message content (status, attachments, reactions, etc.) in MessageList .
Renders a deleted message.
Renders the “edited” label in MessageList . Only shown for other users’ messages.
Customize the message error component.
Renders the message footer in MessageList .
Message list component used to render channel messages.
Renders location content for message attachments containing location data.
Renders the header for a message in MessageList .
Legacy placeholder for the long-press context menu container.
The active runtime overlay path is composed directly from MessageReactionPicker, MessageActionList, and MessageUserReactions. Overriding MessageMenu does not affect the current long-press UI.
Shows thread reply count and avatars of users who replied.
Renders avatars of users who replied in the thread.
Renders a message in MessageList .
See Customizing Message UI .
Renders message status (time and read receipts).
Renders content when the user swipes a message.
Renders system messages that inform users about channel changes. System messages are part of history and have type: "system".
System messages appear when:
Renders message timestamp in MessageList.
Renders message text. By default, the SDK uses Simple Markdown . If you override this, you must handle markdown rendering yourself.
Reaction selector shown in the long-press overlay.
Renders an avatar in the user reactions sheet shown from the long-press overlay.
Customize an individual item in MessageUserReactions (avatar, reaction type, user name, etc.).
Renders the reactions list shown from the long-press overlay.
Renders an avatar in the user reactions sheet shown from the long-press overlay.
Customize an individual item in MessageUserReactions (avatar, reaction type, user name, etc.).
Renders the reactions list shown from the long-press overlay.
Renders the reactions list below the message bubble.
Renders the reactions list above the message bubble.
Renders the clustered reactions list variant.
Renders an individual reaction item.
Wrapper component around an individual reaction item.
Renders the aggregated count item used in reactions list UI.
Renders a button that scrolls the message list to the bottom.
Renders AI-streamed text with a typewriter effect.
Renders the typing indicator in MessageList.
Renders the container for the typing indicator in MessageList.
Renders unread message notifications in MessageList.
Renders URL previews in MessageList.
Renders compact URL previews in MessageList.
Fallback renderer for unsupported/custom attachment types.
Renders video thumbnails for video attachments in MessageList.
A Component prop used to render the content of the Poll component in MessageList.
The component has full access to the entire Poll reactive state through the usePollState hook.
Props PollHeaderA Component prop used to render the header of the PollContent component.
PollButtonsA Component prop used to render the buttons of the PollContent component.