Skip to contentSkip to content

ChatMessageSource API

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

Demos

Import

import { ChatMessageSource } from '@mui/x-chat/ChatMessageSources';
// or
import { ChatMessageSource } from '@mui/x-chat';

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

Props

NameTypeDefaultDescription
href*string-

The URL this source links to.

childrennode-

The content of the component.

classesobject-

Override or extend the styles applied to the component.

See CSS classes API below for more details.

indexnumber-

1-based position number displayed as a muted badge.

slotPropsobject{}

The props used for each component slot.

slotsobject{}

Overridable component slots.

See Slots API below for more details.

titlestring-

Display title for the source. Falls back to href when omitted.

The component cannot hold a ref.

Slots

Slot nameClass nameDefault componentDescription
root.MuiChatMessageSource-root'li'The root list item element.
index.MuiChatMessageSource-index'span'The numeric index badge.

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.