Skip to main content

Where It Fits

CometChatThreadHeader renders the parent message bubble and reply count at the top of a thread panel. Wire it above a CometChatMessageList (with parentMessageId) and CometChatMessageComposer (with parentMessageId) to build a complete thread view.

Minimal Render

Root CSS class: .cometchat-thread-header

Actions and Events

Callback Props

onClose

Fires when the close button is clicked.

onSubtitleClicked

Fires when the subtitle area is clicked.

onError

Fires on internal errors.

SDK Events (Real-Time, Automatic)

The component listens to SDK events internally for real-time reply count updates. No manual attachment needed.

Custom View Slots

messageBubbleView

Replace the parent message bubble with a custom view.

Date Time Format Customization

separatorDateTimeFormat

If no property is passed in the CalendarObject, the component checks the global configuration first. If also missing there, the component’s default formatting applies.

Common Patterns

Thread header with hidden chrome


CSS Architecture

The component uses CSS custom properties (design tokens) defined in @cometchat/chat-uikit-react/css-variables.css.

Key Selectors

Example: Brand-themed thread header


Props

All props are optional unless noted otherwise.

hideDate

Hides the date header.

hideReceipts

Hides the receipt indicator.

hideReplyCount

Hides the reply count.

messageBubbleView

Custom component for the parent message bubble.

messageSentAtDateTimeFormat

Format for the message sent-at timestamp.

onClose

Callback fired when the close button is clicked.

onError

Callback fired when the component encounters an error.

onSubtitleClicked

Callback fired when the subtitle area is clicked.

parentMessage

The parent message displayed in the thread header. Required.

separatorDateTimeFormat

Format for the date separator timestamp.

showScrollbar

Shows the scrollbar in the component.

subtitleView

Custom component for the subtitle text.

template

Custom template for the parent message bubble rendering.

textFormatters

Custom text formatters for message text.

CSS Selectors