Skip to contentSkip to content

ChatConversationList API

API reference docs for the React ChatConversationList component. Learn about the props, CSS, and other APIs of this exported module.

Demos

Import

import { ChatConversationList } from '@mui/x-chat/ChatConversationList';
// or
import { ChatConversationList } from '@mui/x-chat';

Learn about the difference by reading this guide on minimizing bundle size.

Props

Props of the native component are also available.

NameTypeDefaultDescription
classesobject-

Override or extend the styles applied to the component.

See CSS classes API below for more details.

slotPropsobject{}

The props used for each component slot.

slotsobject{}

Overridable component slots.

See Slots API below for more details.

sxArray<func
| object
| bool>
| func
| object
-

The system prop that allows defining system overrides as well as additional CSS styles.

See the `sx` page for more details.

variant'compact'
| 'default'
'default'

The visual variant of the conversation list. - 'default' – shows avatar, title, preview, timestamp, and unread badge. - 'compact' – shows only a small unread indicator, the title, and an actions button.

The component cannot hold a ref.

Slots

Slot nameClass nameDefault componentDescription
root.MuiChatConversationList-root'div'The component that renders the root.
scroller.MuiChatConversationList-scrollerScrollRoot (Base UI ScrollArea.Root wrapper); a styled 'div' in `ChatConversationList`The component that renders the scroller.
viewportScrollViewport (Base UI ScrollArea.Viewport wrapper); a styled 'div' in `ChatConversationList`The component that renders the viewport.
scrollbarScrollScrollbar (Base UI ScrollArea.Scrollbar wrapper); `ChatConversationList` renders noneThe component that renders the scrollbar.
scrollbarThumbScrollThumb (Base UI ScrollArea.Thumb wrapper); `ChatConversationList` renders noneThe component that renders the scrollbar thumb.
item.MuiChatConversationList-itemConversationListItem; a styled 'div' in `ChatConversationList`The component that renders the item.
itemAvatar.MuiChatConversationList-itemAvatarConversationListItemAvatarThe component that renders the item avatar.
itemContent.MuiChatConversationList-itemContentConversationListItemContentThe component that renders the item content.
titleConversationListTitleThe component that renders the title.
previewConversationListPreviewThe component that renders the preview.
timestampConversationListTimestampThe component that renders the timestamp.
unreadBadgeConversationListUnreadBadgeThe component that renders the unread badge.
itemActions.MuiChatConversationList-itemActionsConversationListItemActionsThe component that renders the item actions.

CSS classes

These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.

Class nameRule nameDescription
.MuiChatConversationList-compactcompactApplied when variant="compact"
.MuiChatConversationList-itemFocuseditemFocusedApplied to a focused conversation item
.MuiChatConversationList-itemPreviewitemPreviewStyles applied to the item preview element.
.MuiChatConversationList-itemSelecteditemSelectedApplied to a selected conversation item
.MuiChatConversationList-itemTimestampitemTimestampStyles applied to the item timestamp element.
.MuiChatConversationList-itemTitleitemTitleStyles applied to the item title element.
.MuiChatConversationList-itemUnreaditemUnreadApplied to an unread conversation item
.MuiChatConversationList-itemUnreadBadgeitemUnreadBadgeStyles applied to the item unread badge element.

You can override the style of the component using one of these customization options:

Source code

If you did not find the information in this page, consider having a look at the implementation of the component for more detail.