This is beta documentation for Stream Chat React Native SDK v9. For the latest stable version, see the latest version (v8) .

ChannelAvatar

Renders a channel avatar inside ChannelList.

Best Practices

  • Keep avatar rendering lightweight to avoid list performance issues.
  • Use PreviewAvatar to wrap interactions without altering ChannelAvatar internals.
  • Ensure touch targets are accessible when adding custom onPress.
  • Use the context-provided ImageComponent for consistent image handling.
  • Avoid inline handlers when rendering large lists; memoize where possible.

General Usage

Customize it and pass it via PreviewAvatar on ChannelList.

Example with an onPress handler:

import { TouchableOpacity } from "react-native-gesture-handler";
import { ChannelList, ChannelAvatar } from "stream-chat-react-native";

<ChannelList
  PreviewAvatar={({ channel }) => (
    <TouchableOpacity
      disallowInterruption={true}
      onPress={() => {
        /** Handler for press action */
      }}
    >
      <ChannelAvatar channel={channel} />
    </TouchableOpacity>
  )}
/>;

Props

channel

Channel instance from the Stream Chat client.

showOnlineIndicator

Indicates if the online indicator should be shown.

TypeDefault
Booleantrue

size

Size of the avatar. Default: xl.

TypeDefault
lg | xl | 2xlxl

showBorder

Indicates if the border should be shown.

TypeDefault
Booleantrue