CometChatMessageInformation component displays detailed information about a message, including its content preview, sent timestamp, and delivery/read receipts with user avatars, names, and timestamps. It supports both one-on-one and group conversations with pagination for large groups.
Overview
The Message Information panel provides:- Message Preview: Displays a truncated preview of the message content with media type icons
- Sent Timestamp: Shows when the message was sent using configurable date formats
- Delivery Receipts: Lists users who received the message with timestamps
- Read Receipts: Lists users who read the message with timestamps
- Group Support: Shows user avatars and names for group message receipts
- Pagination: Supports scrolling to load more receipts in large groups
- Focus Trap: Traps keyboard focus within the panel for modal-like behavior
- Error Handling: Displays error state with retry option when receipt fetching fails
Live Preview — default message information preview.
Open in Storybook ↗
Basic Usage
Simple Message Information Panel
With Custom Date Format
Properties
| Property | Type | Default | Description |
|---|---|---|---|
message | CometChat.BaseMessage | required | The message to display information for |
dateTimeFormat | CalendarObject | undefined | Custom date format for receipt timestamps. Falls back to a default format with hh:mm A for today, [Yesterday] hh:mm A for yesterday, and DD/MM/YYYY hh:mm A for other days |
textFormatters | CometChatTextFormatter[] | [] | Text formatters for processing message text content in the message bubble preview. Supports GlobalConfig fallback |
Events
| Event | Payload Type | Description |
|---|---|---|
closeClick | void | Emitted when the panel close button is clicked or Escape key is pressed |
Customization
CSS Variables
The Message Information component uses BEM-style CSS classes with extensive CSS variable overrides:Accessibility
Keyboard Navigation
- Escape: Closes the panel from anywhere within it
- Tab: Navigates between the close button, receipt items, and retry button
- Enter / Space: Activates the close button or retry button
Focus Management
The component activates a focus trap on initialization, keeping keyboard focus within the panel. Focus is returned to the previously focused element when the panel is destroyed.Screen Reader Support
- The panel has a descriptive
aria-labelfor the overall component - The close button has an
aria-labeldescribing its action - Each receipt item includes an accessible label combining the receipt type (delivered/read), user name, and timestamp
- Loading and error states are announced to assistive technologies
High Contrast & Reduced Motion
- Supports
prefers-contrast: highwith stronger borders and outlines - Supports
prefers-reduced-motion: reduceby disabling spinner and button transitions
Related Components
- CometChatMessageList - Parent component that opens the message information panel
- CometChatMessageBubble - Used internally to render the message preview
- CometChatAvatar - Used to display user avatars in receipt items
- CometChatDate - Used to format receipt timestamps