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-rootThe component that renders the root.
scroller.MuiChatConversationList-scrollerThe component that renders the scroller.
viewportThe component that renders the viewport.
scrollbarThe component that renders the scrollbar.
scrollbarThumbThe component that renders the scrollbar thumb.
item.MuiChatConversationList-itemThe component that renders the item.
itemAvatar.MuiChatConversationList-itemAvatarThe component that renders the item avatar.
itemContent.MuiChatConversationList-itemContentThe component that renders the item content.
titleThe component that renders the title.
previewThe component that renders the preview.
timestampThe component that renders the timestamp.
unreadBadgeThe component that renders the unread badge.
itemActions.MuiChatConversationList-itemActionsThe 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.