[object Promise]

# ChatMessageAuthorLabel 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 - Message appearance](/x/react-chat/display/message-appearance/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |

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

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| authorLabel | `'span'` | `.MuiChatMessageAuthorLabel-authorLabel` | The component that renders the author label. |

## CSS

### Rule name

| Global class | Rule name | Description |
|--------------|-----------|-------------|
| - | actions | Styles applied to the message actions element. |
| - | avatar | Styles applied to the message avatar element. |
| - | bubble | Styles applied to the message bubble element inside content. |
| - | content | Styles applied to the message content element. |
| - | dateDivider | Styles applied to the date divider element. |
| - | dateDividerLabel | Styles applied to the formatted day label inside the date divider. |
| - | dateDividerLine | Styles applied to the horizontal rule on each side of the date divider label. |
| `.Mui-error` | - | Applied when the message has an error status |
| - | group | Styles applied to the message group element. |
| - | groupAuthorName | Class applied to the group author name element. |
| - | groupTimestamp | Class applied to the group timestamp element (compact variant only). |
| - | inlineMeta | Styles applied to the inline meta container element (default variant). |
| - | inlineMetaSpacer | Styles applied to the inline meta spacer element (default variant). |
| - | meta | Styles applied to the message meta element. |
| - | noAvatar | Applied when the avatar slot is hidden (`slots.avatar: null`) so the grid drops the avatar track. |
| - | roleAssistant | Applied when the message role is 'assistant' |
| - | roleUser | Applied when the message role is 'user' |
| - | root | Styles applied to the message root element. |
| - | streaming | Applied while the message is streaming |

## 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/ChatMessage/ChatMessageAuthorLabel.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-chat/src/ChatMessage/ChatMessageAuthorLabel.tsx)

# ChatMessageAvatar 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 - Message appearance](/x/react-chat/display/message-appearance/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |

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

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| avatar | `'div'` | - | The component that renders the avatar. |
| image | `'img'` | - | The component that renders the image. |

## 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/ChatMessage/ChatMessageAvatar.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-chat/src/ChatMessage/ChatMessageAvatar.tsx)

# ChatMessageContent API

## Demos

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

- [Chat - Reasoning](/x/react-chat/ai-and-agents/reasoning/)
- [Chat - Step Tracking](/x/react-chat/ai-and-agents/step-tracking/)
- [Chat - Tool calling](/x/react-chat/ai-and-agents/tool-calling/)
- [Chat - Messages](/x/react-chat/basics/messages/)
- [Chat - Custom parts](/x/react-chat/display/message-parts/custom-parts/)
- [Chat - Files and images](/x/react-chat/display/message-parts/files-and-images/)
- [Chat - Sources and citations](/x/react-chat/display/message-parts/sources-and-citations/)
- [Chat - Text and markdown](/x/react-chat/display/message-parts/text-and-markdown/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| afterContent | `node` | - | No |  |
| partProps | `{ dynamic-tool?: { className?: string, defaultExpanded?: object, slotProps?: object, slots?: object, toolSlotProps?: object, toolSlots?: object }, file?: { className?: string, slotProps?: object, slots?: object }, reasoning?: { className?: string, slotProps?: object, slots?: object }, source-document?: { className?: string, slotProps?: object, slots?: object }, source-url?: { className?: string, slotProps?: object, slots?: object }, text?: { renderText?: func }, tool?: { className?: string, defaultExpanded?: object, slotProps?: object, slots?: object, toolSlotProps?: object, toolSlots?: object } }` | - | No |  |
| resolveBuiltInPartRenderer (deprecated) | `function(part: ChatMessagePart, localeText: ChatLocaleText) => ChatPartRenderer<ChatMessagePart> \| null` | - | No | ⚠️ Use `partProps` instead. |
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |

> **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 |
|------|---------|-------|-------------|
| content | `'div'` | - | The component that renders the content. |
| bubble | `'div'` | - | The component that renders the bubble. |

## 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/ChatMessage/ChatMessageContent.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-chat/src/ChatMessage/ChatMessageContent.tsx)

# ChatMessageGroup 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 - Message appearance](/x/react-chat/display/message-appearance/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| messageId | `string` | - | Yes |  |
| children | `node` | - | No |  |
| groupKey | `func` | `(message) => message.author?.id ?? message.role ?? ''` | No |  |
| index | `number` | - | No |  |
| items | `Array<string>` | - | 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 |
|------|---------|-------|-------------|
| 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. |

## 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/ChatMessage/ChatMessageGroup.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-chat/src/ChatMessage/ChatMessageGroup.tsx)

# ChatMessageInlineMeta 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 - Message appearance](/x/react-chat/display/message-appearance/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |

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

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| meta | `'div'; a styled 'span' in `ChatMessageInlineMeta`` | - | The component that renders the meta. |
| timestamp | `'span'` | - | The component that renders the timestamp. |
| status | `'span'` | - | The component that renders the status. |
| edited | `'span'` | - | The component that renders the edited. |
| streamingProgress | `ProgressRoot (Base UI Progress.Root wrapper)` | - | The root element of the streaming progress indicator.
Rendered by Base UI `Progress.Root` when `message.status === 'streaming'`.
Provides `role="progressbar"` and `aria-valuetext` for screen readers. |
| streamingProgressTrack | `ProgressTrack (Base UI Progress.Track wrapper)` | - | The track element wrapping the streaming progress indicator. |
| streamingProgressIndicator | `ProgressIndicator (Base UI Progress.Indicator wrapper)` | - | The animated indicator bar inside the streaming progress track. |

## 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/ChatMessage/ChatMessageInlineMeta.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-chat/src/ChatMessage/ChatMessageInlineMeta.tsx)

# 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)

# ChatMessageMeta 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 - Message appearance](/x/react-chat/display/message-appearance/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| 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.

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| meta | `'div'; a styled 'span' in `ChatMessageInlineMeta`` | - | The component that renders the meta. |
| timestamp | `'span'` | - | The component that renders the timestamp. |
| status | `'span'` | - | The component that renders the status. |
| edited | `'span'` | - | The component that renders the edited. |
| streamingProgress | `ProgressRoot (Base UI Progress.Root wrapper)` | - | The root element of the streaming progress indicator.
Rendered by Base UI `Progress.Root` when `message.status === 'streaming'`.
Provides `role="progressbar"` and `aria-valuetext` for screen readers. |
| streamingProgressTrack | `ProgressTrack (Base UI Progress.Track wrapper)` | - | The track element wrapping the streaming progress indicator. |
| streamingProgressIndicator | `ProgressIndicator (Base UI Progress.Indicator wrapper)` | - | The animated indicator bar inside the streaming progress track. |

## 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/ChatMessage/ChatMessageMeta.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-chat/src/ChatMessage/ChatMessageMeta.tsx)