
Toggle "reveal actions", or hover this bubble.
Reveal per-message action buttons on hover or focus for copy, edit, delete, and custom operations.
ChatMessageActions renders an action bar that appears on hover, on keyboard drill-in (Enter on the focused message), or while focus is inside the bar.
The actions area occupies the actions grid area of the message row; the reveal uses a short opacity transition.
Toggle action buttons, variant, and density to preview the hover-revealed toolbar:

Toggle "reveal actions", or hover this bubble.
import { ChatMessageActions } from '@mui/x-chat';
The action bar is hidden by default and becomes visible when:
ChatMessage rowdata-actionable="true" on the row — see keyboard navigation):focus-within)Inside a message list with roving focus (the default), the hidden bar also uses visibility: hidden, so the action buttons stay out of the tab order until the user drills into the message — tabbing through the chat never stops on an invisible control.
Without roving focus (enableRovingFocus={false} or a standalone ChatMessage), the buttons keep their natural tab order: tabbing onto one reveals the bar through :focus-within.
The hidden bar also sets pointer-events: none, so the transparent buttons ignore the pointer until the bar is revealed; a custom override that keeps the bar visible should also set pointer-events: auto.
The reveal uses a short opacity transition; when the user prefers reduced motion, the transition is disabled.
/* Selectors used by the built-in styles */
.MuiChatMessage-root:hover .MuiChatMessage-actions,
.MuiChatMessage-root[data-actionable='true'] .MuiChatMessage-actions,
.MuiChatMessage-actions:focus-within {
opacity: 1;
visibility: visible;
pointer-events: auto;
}
ChatMessageActions occupies the actions grid area in the message row layout:
ChatMessage (grid)
├── ChatMessageAvatar → grid-area: avatar
├── ChatMessageContent → grid-area: content
├── ChatMessageMeta → grid-area: meta
└── ChatMessageActions → grid-area: actions
The built-in styles render the bar as a small elevated chip (paper background, rounded corners, shadow) anchored under the bubble.
For the current user's own messages it aligns to the end of the row (justify-self: end), matching the right-aligned bubble.
Override either through the .MuiChatMessage-actions class.
ChatMessageActions renders a <div> (or custom slot element) that you populate with action buttons.
When using ChatBox, provide the messageActions slot to render an action row — ChatBox renders no actions until you do. Your component receives { messageId } and is wrapped in the styled hover-revealed bar:
The component you pass to the messageActions slot receives a messageId prop. Pass it to the useMessage() hook (exported from @mui/x-chat/headless) to read the current message and show different actions for user and assistant messages.
Reach the runtime actions with useChatActions()—it returns sendMessage, retry, regenerate, and the rest without subscribing to message state, so the toolbar does not re-render while a response streams:
Instead of replacing the messageActions slot component, pass a function to slotProps.messageActions and return extraActions.
The function receives the message context, so you can target specific rows—for example, a working "Regenerate" button on assistant replies.
Each action's onClick receives (event, { message, chat }); call chat.regenerate(message.id) to request a fresh reply through the runtime:
The standalone ChatMessageActions component forwards the message context as owner state to its actions slot, so slot components can style themselves conditionally (when using the ChatBox messageActions slot, read the same data with useMessage(messageId) instead):
| Property | Type | Description |
|---|---|---|
messageId |
string |
ID of the current message |
message |
ChatMessage | null |
The full message object, or null if not found |
role |
ChatRole | undefined |
Role of the message author (undefined until resolved) |
status |
ChatMessageStatus | undefined |
Current status of the message (undefined until resolved) |
streaming |
boolean |
Whether the message is streaming |
error |
boolean |
Whether the message is in an error state |
isGrouped |
boolean |
Whether the message is in a group |
variant |
ChatVariant |
Current chrome variant |
density |
ChatDensity |
Current chrome density |
resolvedAuthor |
ResolvedMessageAuthor | null |
Resolved author display data |
showAvatar |
boolean |
Whether an avatar column is rendered |
isOwnMessage |
boolean |
Whether the message belongs to the current user (controls right-side alignment) |
| Slot | Default element | Description |
|---|---|---|
actions |
div |
The action bar container |
See the documentation below for a complete reference to all of the props and classes available to the components mentioned here.