Skip to main content

Overview

CometChatSavedMessages lists every message the current user has saved, across all of their conversations. Unlike pinned messages, saves are personal and conversation-agnostic — so this component takes no user/group; it always shows the signed-in user’s own saves and keeps them in sync in real time. It is a standalone screen: the UI Kit does not open it from any built-in header or menu. Mount it wherever your app wants a “Saved” destination — a route, a tab, or a side panel.
Live Preview — interact with the default saved messages screen.Open in Storybook ↗
The component handles:
  • Fetching the current user’s saved messages
  • Real-time updates when a message is saved or unsaved
  • An unsave action per row
  • Empty, loading, and error states
Saving must be enabled for your app through the features.ux.messages.saved.enabled app setting for saves to load. See Core Features.

Usage

Flat API

Compound Composition

For full layout control, compose the sub-components under Root. Omit any sub-component to drop it.

Mounting as a Screen

Because there is no built-in trigger, wire it into your own navigation — for example, a button that toggles a panel:

Filtering

Pass a messagesRequestBuilder to customize the fetch (for example, the page size). Call setSaved(true) on the builder: it is what scopes the request to the current user’s saved messages, and without it the request is an ordinary history read.
The component re-asserts setSaved(true) on whatever builder you pass, so it is safe even if you omit it — but keep it in your code to make the intent explicit.

Actions and Events

Callback Props

Events

The component itself publishes nothing, but the unsave action it renders (through the shared message options) publishes ui:message/save-changed, which keeps other surfaces in sync. It subscribes to the kit event bus and updates its list automatically — an optimistic ui: flip the moment a save/unsave succeeds locally, then the network-confirmed SDK event: See the Event System for the full list.

Customization

Per-message Options

Each saved row exposes an unsave action. Hide it with hideUnsaveMessageOption:
Saved rows are list items rather than full message bubbles, so they carry only the unsave action — there is no full per-message options menu here.

View Props

Replace parts of the UI while keeping the component’s behavior:

Compound Composition

Use sub-components for full layout control:

CSS Styling

Override design tokens on the component selector:

Props

All props are optional.
View slot props (itemView, headerView, emptyView, errorView, loadingView) are convenience props on the flat API. In compound composition mode, use the corresponding sub-components directly.

messagesRequestBuilder

Customize the request used to fetch saved messages (for example, the page size).

textFormatters

Text formatters applied when rendering the saved message previews. See Text Formatters.

hideCloseButton

Hide the close button in the panel header.

hideUnsaveMessageOption

Remove the unsave action from each saved row.

onItemClick

Callback when a saved row is clicked.

onClose

Callback when the close button is clicked.

className

Additional CSS class for the root element.

CSS Selectors


Next Steps

Pin & Save Messages Guide

Build a full pin/save screen end to end

Pinned Messages

The messages pinned in a conversation

Message List

Toggle the save/unsave message options

Theming

Customize colors, fonts, and spacing