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 |
|---|---|---|---|
| classes | object | - | Override or extend the styles applied to the component. See CSS classes API below for more details. |
| slotProps | object | {} | The props used for each component slot. |
| slots | object | {} | Overridable component slots. See Slots API below for more details. |
| sx | Array<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. - |
| Slot name | Class name | Default component | Description |
|---|---|---|---|
| root | .MuiChatConversationList-root | The component that renders the root. | |
| scroller | .MuiChatConversationList-scroller | The component that renders the scroller. | |
| viewport | The component that renders the viewport. | ||
| scrollbar | The component that renders the scrollbar. | ||
| scrollbarThumb | The component that renders the scrollbar thumb. | ||
| item | .MuiChatConversationList-item | The component that renders the item. | |
| itemAvatar | .MuiChatConversationList-itemAvatar | The component that renders the item avatar. | |
| itemContent | .MuiChatConversationList-itemContent | The component that renders the item content. | |
| title | The component that renders the title. | ||
| preview | The component that renders the preview. | ||
| timestamp | The component that renders the timestamp. | ||
| unreadBadge | The component that renders the unread badge. | ||
| itemActions | .MuiChatConversationList-itemActions | The component that renders the item actions. |
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-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. |
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.