[object Promise]

# ChatMessageList API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Chat - Messages](/x/react-chat/basics/messages/)
- [Chat - Scrolling](/x/react-chat/behavior/scrolling/)
- [Chat - Message list](/x/react-chat/material/message-list/)
- [Chat - History and pagination](/x/react-chat/multi-conversation/history-and-pagination/)

## Import

```jsx
import { ChatMessageList } from '@mui/x-chat/ChatMessageList';
// or
import { ChatMessageList } from '@mui/x-chat';
```

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| autoScroll | `{ buffer?: number } \| bool` | `true` | No |  |
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| enableRovingFocus | `bool` | `true` | No |  |
| estimatedItemSize | `number` | `84` | No |  |
| features | `{ dateDivider?: bool, streamingIndicator?: 'auto' \| bool, unreadMarker?: bool }` | - | No |  |
| getItemKey | `function(id: string, index: number) => React.Key` | `(id) => id` | No |  |
| items | `Array<string>` | - | No |  |
| onReachBottom | `func` | - | No |  |
| onReachTop | `func` | - | No |  |
| overlay | `node` | `null` | No |  |
| renderItem | `func` | - | No |  |
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |
| sx | `Array<func \| object \| bool> \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. |

> **Note**: The `ref` is forwarded to the root element.

> Any other props supplied will be provided to the root element (native element).

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| messageList | `ScrollRoot (Base UI ScrollArea.Root wrapper); a styled 'div' in `ChatMessageList`` | - | The component that renders the message list. |
| messageListScroller | `ScrollViewport (Base UI ScrollArea.Viewport wrapper), or 'div' when `slots.messageList` is set; a styled 'div' in `ChatMessageList`` | - | The component that renders the message list scroller. |
| messageListContent | `'div'` | - | The component that renders the message list content. |
| messageListOverlay | `'div'` | - | The component that renders the message list overlay. |
| messageListScrollbar | `ScrollScrollbar (Base UI ScrollArea.Scrollbar wrapper); not rendered when `slots.messageList` is set, as in `ChatMessageList`` | - | The component that renders the message list scrollbar. |
| messageListScrollbarThumb | `ScrollThumb (Base UI ScrollArea.Thumb wrapper); not rendered when `slots.messageList` is set, as in `ChatMessageList`` | - | The component that renders the message list scrollbar thumb. |
| messageListStatus | `'div'` | - | The visually-hidden `role="status"` element announcing streaming
transitions ("Assistant is responding" / "Response complete") to screen
readers. Pass `null`-rendering component to silence the announcements. |
| dateDivider | `ChatDateDivider` | - | The date separator rendered between message groups. Only rendered when
`features.dateDivider` is enabled. Pass `null` to hide it. |
| unreadMarker | `ChatUnreadMarker` | - | The "new messages" marker. Only rendered when `features.unreadMarker` is
enabled. Pass `null` to hide it. |
| messageGroup | `'div'` | - | The per-author group wrapper around consecutive messages. |
| streamingIndicator | `ChatStreamingIndicator, wrapped in an assistant row with an avatar while waiting for the response to start` | - | The animated dots shown while an assistant response is in flight: as a
trailing row while waiting for the response to start, then inside the
assistant bubble while it streams. Controlled by
`features.streamingIndicator` (`'auto'` by default). Pass `null` to hide it. |
| messageRoot | `'div'` | - | Styled root of `` (wrapper-only); the default avatar/content/meta
tree still renders inside it. |
| messageAvatar | `ChatMessageAvatar` | - | Avatar component. Pass `null` to hide the avatar entirely and drop the
reserved avatar grid track. |
| messageContent | `ChatMessageContent` | - | The message bubble component. |
| messageMeta | `ChatMessageMeta` | - | External meta (compact variant). Pass `null` to hide. |
| messageInlineMeta | `ChatMessageInlineMeta` | - | Inline meta rendered inside the bubble (default variant). Pass `null` to hide. |
| messageError | `ChatMessageError` | - | Error card shown under the bubble when the message status is `error`.
Pass `null` to hide the error surface entirely (no component is mounted). |
| messageActions | `An actions row with only the `extraActions` from `slotProps.messageActions`, if any.` | - | Actions row component (receives `{ messageId }`). Pass `null` to hide
actions entirely; omit to render only the declarative `extraActions` from
`slotProps.messageActions` if provided. |
| messageAuthorName | `'div'` | - | Author name label rendered by the group wrapper (default variant: above the
bubble; compact variant: inside the message grid). Pass `null` to hide. |

## CSS

### Rule name

| Global class | Rule name | Description |
|--------------|-----------|-------------|
| - | content | Styles applied to the message list content element. |
| - | root | Styles applied to the message list root element. |
| - | scroller | Styles applied to the message list scroller element. |

## Source code

If you did not find the information on this page, consider having a look at the implementation of the component for more detail.

- [/packages/x-chat/src/ChatMessageList/ChatMessageList.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-chat/src/ChatMessageList/ChatMessageList.tsx)

# ChatScrollToBottomAffordance API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Chat - Scrolling](/x/react-chat/behavior/scrolling/)
- [Chat - Message list](/x/react-chat/material/message-list/)

## Import

```jsx
import { ChatScrollToBottomAffordance } from '@mui/x-chat/ChatIndicators';
// or
import { ChatScrollToBottomAffordance } from '@mui/x-chat';
```

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| scrollBehavior | `'auto' \| 'instant' \| 'smooth'` | - | No |  |
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |
| sx | `Array<func \| object \| bool> \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. |

> **Note**: The `ref` is forwarded to the root element.

> Any other props supplied will be provided to the root element (native element).

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| root | `'button'; a styled IconButton in `ChatScrollToBottomAffordance`` | `.MuiChatScrollToBottomAffordance-root` | The component that renders the root. |
| badge | `'span'` | - | The component that renders the badge. |
| icon | `A text label; an arrow icon in `ChatScrollToBottomAffordance`.` | - | The component that renders the icon. |

## Source code

If you did not find the information on this page, consider having a look at the implementation of the component for more detail.

- [/packages/x-chat/src/ChatIndicators/ChatScrollToBottomAffordance.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-chat/src/ChatIndicators/ChatScrollToBottomAffordance.tsx)