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
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.
The component cannot hold a ref.

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-rootrootStyles applied to the root element (the dots).
.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.