[object Promise]

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