[object Promise]

# ChatMessageActions API

## Demos

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

- [Chat - Message actions](/x/react-chat/display/message-actions/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| extraActions | `Array<{ disabled?: bool, icon?: node, id: string, label: string, onClick: func }>` | - | No |  |
| message | `{ author?: { avatarUrl?: string, displayName?: string, id: string, isOnline?: bool, metadata?: object, role?: 'assistant' \| 'system' \| 'user' }, conversationId?: string, createdAt?: string, editedAt?: string, id: string, metadata?: object, parts: Array<{ data: any, id?: string, transient?: bool, type: object } \| { filename?: string, mediaType: string, type: 'file', url: string } \| { sourceId: string, text?: string, title?: string, type: 'source-document' } \| { sourceId: string, title?: string, type: 'source-url', url: string } \| { state?: 'done' \| 'streaming', text: string, type: 'reasoning' } \| { state?: 'done' \| 'streaming', text: string, type: 'text' } \| { toolInvocation: { approval?: object, approvalId?: string, callProviderMetadata?: object, errorText?: string, input?: any, output?: any, preliminary?: bool, providerExecuted?: bool, state: 'approval-requested' \| 'approval-responded' \| 'input-available' \| 'input-streaming' \| 'output-available' \| 'output-denied' \| 'output-error', title?: string, toolCallId: string, toolName: string }, type: 'dynamic-tool' } \| { toolInvocation: { approval?: object, approvalId?: string, callProviderMetadata?: object, errorText?: string, input?: any, output?: any, preliminary?: bool, providerExecuted?: bool, state: 'approval-requested' \| 'approval-responded' \| 'input-available' \| 'input-streaming' \| 'output-available' \| 'output-denied' \| 'output-error', title?: string, toolCallId: string, toolName: string }, type: 'tool' } \| { type: 'step-start' }>, role: 'assistant' \| 'system' \| 'user', status?: 'cancelled' \| 'error' \| 'pending' \| 'read' \| 'sending' \| 'sent' \| 'streaming', updatedAt?: 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 |
|------|---------|-------|-------------|
| actions | `'div'` | - | The component that renders the actions. |

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