ChannelPreviewUnreadCount

Renders unread count inside ChannelList. This is the default component for the ChannelPreviewUnreadCount override.

Best Practices

  • Clamp counts with maxUnreadCount to avoid overflow.
  • Hide the badge when unread is zero.
  • Keep badge size consistent across the list.
  • Use channel-level unread counts for accuracy.
  • Avoid expensive formatting in render.

Props

PropDescriptionType
channelChannel instance from the Stream Chat client.Channel
maxUnreadCountMax number shown in the unread badge. The value cannot exceed the backend limit of 255. Defaults to 255.number
unreadNumber of unread messages in the channel.number