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

NameTypeDescription
href*string

The URL this source links to.

indexnumber

1-based position number displayed as a muted badge.

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.