Skip to main content
Threaded messages let users create sub-conversations by replying to specific messages in group chats. This reduces clutter and keeps discussions focused. Before starting, complete the Integration Guide.

Components


Implementation Steps

1. Thread State Management

Create a component that tracks the parent message the user clicked “Reply in Thread” on. When set, show the threaded messages side panel.

2. Thread Trigger from Group Messages

Wire the threadRepliesClick output on cometchat-message-list. When a user clicks the thread reply icon on any message, this fires with the parent message object.

3. Threaded Messages Component

Render the thread panel with the parent message context, the reply list scoped by parentMessage, and a composer scoped to the thread.

4. Thread Panel with Blocked Composer Fallback

When the composer is blocked (e.g., permissions), show a fallback message instead.

5. Full Component Example

A complete standalone component wiring thread state, the trigger, and the panel together.

Thread Subscription

Users can also subscribe to a thread, so they keep getting notified about new replies even when they are not looking at it, and unsubscribe when they no longer want them. The UI Kit surfaces this in two places, both wired out of the box once the feature is on:
  • A control in the top bar of the cometchat-thread-header you rendered in step 3.
  • An option in the message context menu of cometchat-message-list, right after Reply in thread.
Both read the current state, flip it optimistically on click, and show a toast if the server rejects the change. No wiring is required to make them work.
Thread subscription is off by default. Turn it on with enableThreadSubscription in Global Configuration — no backend capability flag exists for the kit to feature-detect from, so whether the thread endpoints are deployed for your app is something only you know.
To react to a change, handle (threadSubscriptionChange) on either surface:
To hide a surface without turning the feature off, use [hideThreadSubscriptionToggle] on the thread header, or [hideThreadSubscriptionOption] on the message list. See the Thread Subscription guide for the full feature — the service, the events, and the optimistic and revert behavior.

Feature Matrix


Next Steps

Message List

Render real-time message threads.

Thread Header

Customize the thread header component.

Thread Subscription

Notify users about new replies in a thread.

All Guides

Browse all feature and formatter guides.

Sample App

Full working sample application on GitHub.