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 of the native component are also available.
| Name | Type | Default | Description |
|---|---|---|---|
| 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 |
| messageId | string | - | Row contract shared with the divider slots: when |
| mode | 'auto' | bool | 'auto' | Controls when the indicator renders.
|
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 |
|---|---|---|
| .MuiChatStreamingIndicator-bubble | bubble | Styles applied to the waiting-phase typing bubble. |
| .MuiChatStreamingIndicator-root | root | Styles applied to the root element (the dots). |
| .MuiChatStreamingIndicator-row | row | Styles applied to the waiting-phase assistant row wrapper. |
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.