MessagePinnedHeader

Renders the pinned message label inside MessageList.

Best Practices

  • Keep the pinned label subtle to avoid distracting from content.
  • Show the label only when a message is actually pinned.
  • Use consistent styling with other message metadata.
  • Avoid heavy logic in the header render.
  • Override via WithComponents for centralized customization.

Basic Usage

Replace the default UI via WithComponents.

import { WithComponents, MessagePinnedHeader } from "stream-chat-react-native";

const MessagePinnedHeaderComponent = () => <MessagePinnedHeader />;

<WithComponents
  overrides={{ MessagePinnedHeader: MessagePinnedHeaderComponent }}
>
  <Channel channel={channel}>
    <MessageList />
    <MessageComposer />
  </Channel>
</WithComponents>;

Props

This component reads default values from MessageContext.

Prop Description Type
message Message object. Message type
Add Chat to my app: getstream.io/SKILL.md

The fastest way to build with Stream. Start a new project or improve an existing one. Full CLI and documentation integration out of the box.


Ask your agent:

/stream Build me a Social App with Feeds and Moderation.
/stream Any livestream calls running?
/stream Chat React Native v9: <Your Question>