> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-platform-docs-release.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Plugin

> Renders deleted messages with a 'This message was deleted' placeholder.

<Accordion title="AI Integration Quick Reference">
  | Field                | Value                         |
  | -------------------- | ----------------------------- |
  | Plugin ID            | `delete`                      |
  | Package              | `@cometchat/chat-uikit-react` |
  | Message Types        | (any deleted message)         |
  | Message Categories   | (any)                         |
  | Included by Default  | Yes                           |
  | Bubble Component     | `CometChatDeleteBubble`       |
  | Conversation Preview | This message was deleted      |
  | Context Menu         | None                          |
</Accordion>

## Overview

The Delete plugin handles any message that has been deleted (where `getDeletedAt()` returns a non-null value). It renders a placeholder bubble indicating the message was removed.

<Info>
  **Live Preview** — interact with the delete message bubble.

  [Open in Storybook ↗](https://storybook.cometchat.io/react/?path=/story/components-bubbles-message-bubble-delete--default)
</Info>

<iframe src="https://storybook.cometchat.io/react/iframe.html?id=components-bubbles-message-bubble-delete--default&viewMode=story&shortcuts=false&singleStory=true" className="w-full rounded-xl" loading="lazy" style={{height: "250px", border: "1px solid #e0e0e0"}} title="Delete Message Bubble — Default" allow="clipboard-write" />

***

## Bubble Rendering

* **Placeholder text** — "This message was deleted" (localized)
* **Styling** — italic, muted text color, no bubble background for incoming
* **Variant** — different styling for sent vs received deleted messages

### Resolution

The Delete plugin is special — it's matched by the Plugin Registry's **deleted-message fast path**, not by type+category. When the registry encounters a message with `getDeletedAt() !== null`, it immediately returns the Delete plugin regardless of the message's original type.

This means a deleted text message, deleted image, deleted poll — all render the same "deleted" placeholder.

***

## Context Menu Options

None — deleted messages have no context menu options.

***

## Conversation Preview

Returns: `This message was deleted` (localized via `message_deleted` key)

***

## CSS Selectors

| Target           | Selector                         |
| ---------------- | -------------------------------- |
| Bubble root      | `.cometchat-delete-bubble`       |
| Placeholder text | `.cometchat-delete-bubble__text` |
