A simple Angular component for displaying deleted message placeholders in a chat interface
The CometChatDeleteBubble component is a simple presentational Angular component that displays a placeholder indicating a message has been deleted. Unlike other message bubble components, it does NOT accept a CometChat message object - only simple inputs for styling and text customization.
The Delete Bubble component provides a clear visual indicator that a message was deleted, with support for both sender (outgoing) and receiver (incoming) styling variants:
Delete Icon Display: Shows a recognizable delete/trash icon
Localized Default Text: Displays “This message was deleted” in the user’s language
Custom Text Support: Allows overriding the default text
Sender/Receiver Variants: Different styling for outgoing vs incoming messages
Full Accessibility Support: ARIA role and labels for screen readers
CSS Variable-Based Theming: Easy customization via CSS variables
Determines sender (outgoing) or receiver (incoming) styling. When true, applies primary color background with white text/icon. When false, applies neutral background with neutral text/icon
text
string
undefined
Optional custom text to display instead of the default localized text. If not provided, uses the “message_deleted” localization key
Screen readers announce the delete bubble as a status message with the displayed text (either the localized default “This message was deleted” or custom text). The role="status" attribute ensures that screen readers treat this as an informational message rather than interactive content.
Use the delete bubble to indicate that a message was deleted, providing users with context about missing content in the conversation.
The component does NOT accept a CometChat message object. You must determine the isSentByMe value based on the original message sender.
The default text is automatically localized. Only provide custom text via the text input if you need to override the default message.
For consistent styling, use the sender variant (isSentByMe="true") for messages the logged-in user deleted, and the receiver variant for messages deleted by others.