Skip to contentSkip to content

ChatStreamingIndicator API

API reference docs for the React ChatStreamingIndicator component. Learn about the props, CSS, and other APIs of this exported module.

Demos

Import

import { ChatStreamingIndicator } from '@mui/x-chat/ChatIndicators';
// or
import { ChatStreamingIndicator } from '@mui/x-chat';

Learn about the difference by reading this guide on minimizing bundle size.



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 message while it streams.

Props

Props of the native component are also available.

NameTypeDefaultDescription
classesobject-

Override or extend the styles applied to the component.

See CSS classes API below for more details.

indexnumber-

The index of the row in items.

itemsArray<string>-

The ids of the messages in the list, in order.

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 }
-

The assistant message to reflect. Falls back to the surrounding MessageContext when omitted (the default when mounted inside a chat message). When a message is in scope, the indicator renders only while that message is an assistant message with status: 'streaming'.

messageIdstring-

Row contract shared with the divider slots: when index/items are provided, the indicator self-suppresses on every row except the last one.

mode'auto'
| bool
'auto'

Controls when the indicator renders.

  • 'auto' – shown only in assistant-backed conversations (auto-detected).
  • true – always shown while a response is in flight.
  • false – never shown.
slotPropsobject{}

The props used for each component slot.

slotsobject{}

Overridable component slots.

See Slots API below for more details.

sxArray<func
| object
| bool>
| func
| object
-

The system prop that allows defining system overrides as well as additional CSS styles.

See the `sx` page for more details.

The component cannot hold a ref.

Slots

Slot nameClass nameDefault componentDescription
root.MuiChatStreamingIndicator-rootThe component that renders the root.

CSS classes

These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.

Class nameRule nameDescription
.MuiChatStreamingIndicator-bubblebubbleStyles applied to the waiting-phase typing bubble.
.MuiChatStreamingIndicator-rowrowStyles applied to the waiting-phase assistant row wrapper.

You can override the style of the component using one of these customization options:

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.