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 of the native component are also available.
| Name | Type | Default | Description |
|---|---|---|---|
| variant | 'compact' | 'default' | 'default' | The visual variant of the conversation list. - |
These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.
| Class name | Rule name | Description |
|---|---|---|
| .MuiChatConversationList-compact | compact | Applied when variant="compact" |
| .MuiChatConversationList-item | item | Styles applied to the list item element. |
| .MuiChatConversationList-itemActions | itemActions | Styles applied to the item actions element. |
| .MuiChatConversationList-itemAvatar | itemAvatar | Styles applied to the item avatar element. |
| .MuiChatConversationList-itemContent | itemContent | Styles applied to the item content element. |
| .MuiChatConversationList-itemFocused | itemFocused | Applied to a focused conversation item |
| .MuiChatConversationList-itemPreview | itemPreview | Styles applied to the item preview element. |
| .MuiChatConversationList-itemSelected | itemSelected | Applied to a selected conversation item |
| .MuiChatConversationList-itemTimestamp | itemTimestamp | Styles applied to the item timestamp element. |
| .MuiChatConversationList-itemTitle | itemTitle | Styles applied to the item title element. |
| .MuiChatConversationList-itemUnread | itemUnread | Applied to an unread conversation item |
| .MuiChatConversationList-itemUnreadBadge | itemUnreadBadge | Styles applied to the item unread badge element. |
| .MuiChatConversationList-root | root | Styles applied to the conversation list root element. |
| .MuiChatConversationList-scroller | scroller | Styles applied to the scroller element. |
You can override the style of the component using one of these customization options:
- With a global class name.
- With a rule name as part of the component's
styleOverridesproperty in a custom theme.
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.