[object Promise]

# ChatDateDivider API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Chat - Date divider](/x/react-chat/display/date-divider/)
- [Chat - Message appearance](/x/react-chat/display/message-appearance/)
- [Chat - Message list](/x/react-chat/material/message-list/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| messageId | `string` | - | Yes |  |
| formatDate | `function(date: Date) => React.ReactNode` | - | No |  |
| index | `number` | - | No |  |
| items | `Array<string>` | - | No |  |
| shouldShowDivider | `function(params: object, params.message: ChatMessage, params.previousMessage: ChatMessage \| null, params.index: number, params.date: Date \| null, params.previousDate: Date \| null) => boolean` | `Renders when `message.createdAt` falls on a different UTC
calendar day than the previous message's.` | No |  |
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |
| sx | `Array<func \| object \| bool> \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. |

> **Note**: The `ref` is forwarded to the root element.

> Any other props supplied will be provided to the root element (native element).

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| divider | `'div'` | - | The component that renders the divider. |
| line | `'div'` | - | The component that renders the line. |
| label | `'div'` | - | The component that renders the label. |

## Source code

If you did not find the information on this page, consider having a look at the implementation of the component for more detail.

- [/packages/x-chat/src/ChatMessage/ChatDateDivider.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-chat/src/ChatMessage/ChatDateDivider.tsx)