ChatMessageActions API
API reference docs for the React ChatMessageActions component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import { ChatMessageActions } from '@mui/x-chat/ChatMessage';
// or
import { ChatMessageActions } 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 | Description |
|---|
The component cannot hold a ref.
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 |
|---|---|---|
| .Mui-error | Applied when the message has an error status | |
| .MuiChatMessageActions-actions | actions | Styles applied to the message actions element. |
| .MuiChatMessageActions-authorLabel | authorLabel | Styles applied to the message author label element. |
| .MuiChatMessageActions-avatar | avatar | Styles applied to the message avatar element. |
| .MuiChatMessageActions-bubble | bubble | Styles applied to the message bubble element inside content. |
| .MuiChatMessageActions-content | content | Styles applied to the message content element. |
| .MuiChatMessageActions-dateDivider | dateDivider | Styles applied to the date divider element. |
| .MuiChatMessageActions-group | group | Styles applied to the message group element. |
| .MuiChatMessageActions-groupAuthorName | groupAuthorName | Class applied to the group author name element. |
| .MuiChatMessageActions-groupTimestamp | groupTimestamp | Class applied to the group timestamp element (compact variant only). |
| .MuiChatMessageActions-inlineMeta | inlineMeta | Styles applied to the inline meta container element (default variant). |
| .MuiChatMessageActions-inlineMetaSpacer | inlineMetaSpacer | Styles applied to the inline meta spacer element (default variant). |
| .MuiChatMessageActions-meta | meta | Styles applied to the message meta element. |
| .MuiChatMessageActions-roleAssistant | roleAssistant | Applied when the message role is 'assistant' |
| .MuiChatMessageActions-roleUser | roleUser | Applied when the message role is 'user' |
| .MuiChatMessageActions-root | root | Styles applied to the message root element. |
| .MuiChatMessageActions-streaming | streaming | Applied while the message is streaming |
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.