Skip to contentSkip to content

ChatDateDivider API

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

Demos

Import

import { ChatDateDivider } from '@mui/x-chat/ChatMessage';
// or
import { ChatDateDivider } from '@mui/x-chat';

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

Props

Props of the native component are also available.

NameTypeDescription
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
.Mui-errorApplied when the message has an error status
.MuiChatDateDivider-actionsactionsStyles applied to the message actions element.
.MuiChatDateDivider-authorLabelauthorLabelStyles applied to the message author label element.
.MuiChatDateDivider-avataravatarStyles applied to the message avatar element.
.MuiChatDateDivider-bubblebubbleStyles applied to the message bubble element inside content.
.MuiChatDateDivider-contentcontentStyles applied to the message content element.
.MuiChatDateDivider-dateDividerdateDividerStyles applied to the date divider element.
.MuiChatDateDivider-groupgroupStyles applied to the message group element.
.MuiChatDateDivider-groupAuthorNamegroupAuthorNameClass applied to the group author name element.
.MuiChatDateDivider-groupTimestampgroupTimestampClass applied to the group timestamp element (compact variant only).
.MuiChatDateDivider-inlineMetainlineMetaStyles applied to the inline meta container element (default variant).
.MuiChatDateDivider-inlineMetaSpacerinlineMetaSpacerStyles applied to the inline meta spacer element (default variant).
.MuiChatDateDivider-metametaStyles applied to the message meta element.
.MuiChatDateDivider-roleAssistantroleAssistantApplied when the message role is 'assistant'
.MuiChatDateDivider-roleUserroleUserApplied when the message role is 'user'
.MuiChatDateDivider-rootrootStyles applied to the message root element.
.MuiChatDateDivider-streamingstreamingApplied while the message is streaming

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.