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 | 'div' | The component that renders the root. |
| scroller | .MuiChatConversationList-scroller | ScrollRoot (Base UI ScrollArea.Root wrapper); a styled 'div' in `ChatConversationList` | The component that renders the scroller. |
| viewport | ScrollViewport (Base UI ScrollArea.Viewport wrapper); a styled 'div' in `ChatConversationList` | The component that renders the viewport. | |
| scrollbar | ScrollScrollbar (Base UI ScrollArea.Scrollbar wrapper); `ChatConversationList` renders none | The component that renders the scrollbar. | |
| scrollbarThumb | ScrollThumb (Base UI ScrollArea.Thumb wrapper); `ChatConversationList` renders none | The component that renders the scrollbar thumb. | |
| item | .MuiChatConversationList-item | ConversationListItem; a styled 'div' in `ChatConversationList` | The component that renders the item. |
| itemAvatar | .MuiChatConversationList-itemAvatar | ConversationListItemAvatar | The component that renders the item avatar. |
| itemContent | .MuiChatConversationList-itemContent | ConversationListItemContent | The component that renders the item content. |
| title | ConversationListTitle | The component that renders the title. | |
| preview | ConversationListPreview | The component that renders the preview. | |
| timestamp | ConversationListTimestamp | The component that renders the timestamp. | |
| unreadBadge | ConversationListUnreadBadge | The component that renders the unread badge. | |
| itemActions | .MuiChatConversationList-itemActions | ConversationListItemActions | 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.