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
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.

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-itemitemStyles applied to the list item element.
.MuiChatConversationList-itemActionsitemActionsStyles applied to the item actions element.
.MuiChatConversationList-itemAvataritemAvatarStyles applied to the item avatar element.
.MuiChatConversationList-itemContentitemContentStyles applied to the item content element.
.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.
.MuiChatConversationList-rootrootStyles applied to the conversation list root element.
.MuiChatConversationList-scrollerscrollerStyles applied to the scroller 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.