This is beta documentation for Stream Chat React SDK v14. For the latest stable version, see the latest version (v13) .

VirtualizedMessageList

VirtualizedMessageList renders channel messages in a virtualized list. It is optimized for high-volume or long-lived channels by keeping only the visible items in the DOM.

Like MessageList, it reads messages from ChannelStateContext by default and renders unread and notification UI around the list.

Best Practices

  • Prefer VirtualizedMessageList for high-traffic channels or long histories.
  • Set defaultItemHeight or additionalVirtuosoProps.defaultItemHeight if the first rendered item is much taller than the average message.
  • Keep custom renderers lightweight to preserve virtualization gains.
  • Use the list-level Message prop or WithComponents for message UI, not Channel Message={...}.
  • Test unread notifications, separators, and grouping with virtualization enabled.

Basic Usage

import {
  Channel,
  ChannelHeader,
  MessageInput,
  VirtualizedMessageList,
  Window,
} from "stream-chat-react";

const App = () => (
  <Channel>
    <Window>
      <ChannelHeader />
      <VirtualizedMessageList />
      <MessageInput />
    </Window>
  </Channel>
);

If you need to override the rendered message array:

<VirtualizedMessageList messages={customMessages} />

Scroll Behavior

The list estimates total height from the first rendered item unless you provide a default item height. If the newest message is unusually tall, set a more representative height:

<VirtualizedMessageList defaultItemHeight={76} />

Notifications And Unread UI

The virtualized list uses the same unread and notification split as MessageList:

  • UnreadMessagesNotification
  • NewMessageNotification
  • ScrollToLatestMessageButton
  • MessageListNotifications

MessageListNotifications renders notifications and connection state. The new-message and scroll buttons are separate components.

Props

VirtualizedMessageList forwards the same message-level props as MessageList, including:

  • additionalMessageInputProps
  • closeReactionSelectorOnClick
  • disableQuotedMessages
  • formatDate
  • getDeleteMessageErrorNotification
  • getFlagMessageErrorNotification
  • getFlagMessageSuccessNotification
  • getMarkMessageUnreadErrorNotification
  • getMarkMessageUnreadSuccessNotification
  • getMuteUserErrorNotification
  • getMuteUserSuccessNotification
  • getPinMessageErrorNotification
  • Message
  • messageActions
  • onlySenderCanEdit
  • onMentionsClick
  • onMentionsHover
  • onUserClick
  • onUserHover
  • openThread
  • pinPermissions
  • reactionDetailsSort
  • renderText
  • retrySendMessage
  • showAvatar
  • sortReactions
  • sortReactionDetails
  • unsafeHTML
PropDescriptionType
additionalVirtuosoPropsAdditional props for the underlying react-virtuoso list.VirtuosoProps
channelUnreadUiStateOverride for unread UI state.ChannelStateContextValue["channelUnreadUiState"]
customMessageRendererCustom per-item renderer for virtualized messages.VirtualizedMessageListProps["customMessageRenderer"]
defaultItemHeightDefault item height used for list-size estimation.number
disableDateSeparatorDisables injected date separators.boolean
groupStylesCustom callback for message grouping.VirtualizedMessageListProps["groupStyles"]
hasMoreWhether older messages can be loaded.boolean
hasMoreNewerWhether newer messages can be loaded.boolean
headElement rendered above the thread reply list. Deprecated in favor of additionalVirtuosoProps.components.Header.ReactElement
hideDeletedMessagesHides deleted-message bubbles.boolean
hideNewMessageSeparatorHides the separator inserted for unread incoming messages in watched but inactive channels.boolean
highlightedMessageIdMessage ID to center and highlight.string
loadMoreLoads older messages.() => Promise<void>
loadMoreNewerLoads newer messages.() => Promise<void>
maxTimeBetweenGroupedMessagesMaximum time window for grouping messages together.number
messageLimitPage size used for pagination.number
messagesCustom message array overriding ChannelStateContext.messages.LocalMessage[]
overscanDeprecated overscan prop. Prefer additionalVirtuosoProps.overscan.number
returnAllReadDataKeeps read receipts for every own message.boolean
reviewProcessedMessageLets you inspect and adjust processed list items.ProcessMessagesParams["reviewProcessedMessage"]
scrollSeekPlaceHolderDeprecated fast-scroll placeholder config.object
scrollToLatestMessageOnFocusScrolls to the latest message when the window regains focus.boolean
separateGiphyPreviewRenders giphy previews above the composer instead of inline in the list.boolean
shouldGroupByUserGroups consecutive messages by user.boolean
showUnreadNotificationAlwaysShows unread notification even when the unread separator is not visible.boolean
stickToBottomScrollBehaviorScroll behavior used when staying pinned to the latest message."smooth" | "auto"
suppressAutoscrollPrevents automatic scrolling when new messages arrive.boolean
threadListMarks the list as a thread list.boolean