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

# Menu & Options

> Customize CometChat Flutter UI Kit message options, long-press menus, composer attachments, and template-level actions.

Components provide long-press context menus (e.g., on conversations or messages) and the message composer provides attachment options. You can customize all of these at the component level or via message templates.

## Message Bubble Options

### Via Message Templates

Each `CometChatMessageTemplate` has an `options` callback that controls what appears when a message is long-pressed:

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessageTemplate(
      type: MessageTypeConstants.text,
      category: MessageCategoryConstants.message,
      options: (loggedInUser, messageObject, context, group, additionalConfigurations) {
        // Get the default options
        final defaults = MessageTemplateUtils.getTextMessageOptions(
          loggedInUser, messageObject, context, group, additionalConfigurations,
        );
        // Add a custom option at the beginning
        return [
          CometChatMessageOption(
            id: 'translate',
            title: 'Translate',
            icon: Icon(Icons.translate, size: 24),
            onClick: () => translateMessage(messageObject),
          ),
          ...defaults,
        ];
      },
    )
    ```
  </Tab>
</Tabs>

### Replacing All Options

Return only your custom options to completely replace the defaults:

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessageTemplate(
      type: MessageTypeConstants.text,
      category: MessageCategoryConstants.message,
      options: (loggedInUser, messageObject, context, group, additionalConfigurations) {
        return [
          CometChatMessageOption(
            id: 'bookmark',
            title: 'Bookmark',
            icon: Icon(Icons.bookmark_border, size: 24),
            onClick: () => bookmarkMessage(messageObject),
          ),
          CometChatMessageOption(
            id: 'share',
            title: 'Share',
            icon: Icon(Icons.share, size: 24),
            onClick: () => shareMessage(messageObject),
          ),
        ];
      },
    )
    ```
  </Tab>
</Tabs>

## Message Option Visibility

The `CometChatMessageList` provides boolean properties to hide specific default options without needing to override templates:

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessageList(
      user: user,
      hideCopyMessageOption: true,
      hideDeleteMessageOption: false,
      hideEditMessageOption: false,
      hideReactionOption: false,
      hideReplyInThreadOption: true,
      hideTranslateMessageOption: true,
      hideShareMessageOption: true,
      hideMessageInfoOption: false,
      hideMessagePrivatelyOption: true,
    )
    ```
  </Tab>
</Tabs>

## Composer Attachment Options

The `CometChatMessageComposer` provides boolean properties to control which attachment options appear:

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessageComposer(
      user: user,
      hideImageAttachmentOption: false,
      hideVideoAttachmentOption: false,
      hideAudioAttachmentOption: true,
      hideFileAttachmentOption: false,
      hidePollsOption: true,
      hideCollaborativeDocumentOption: true,
      hideCollaborativeWhiteboardOption: true,
      hideTakePhotoOption: false,
      hideStickersButton: false,
      hideAttachmentButton: false,
    )
    ```
  </Tab>
</Tabs>

## Conversation Options

For conversations, use `setOptions` and `addOptions` on the `CometChatConversations` component:

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    // Add custom options to existing defaults
    CometChatConversations(
      addOptions: (context, conversation) {
        return [
          CometChatPopupMenu.MenuItem(
            id: 'pin',
            title: 'Pin Conversation',
            icon: Icon(Icons.push_pin),
            onTap: () => pinConversation(conversation),
          ),
        ];
      },
    )

    // Replace all options
    CometChatConversations(
      setOptions: (context, conversation) {
        return [
          CometChatPopupMenu.MenuItem(
            id: 'archive',
            title: 'Archive',
            icon: Icon(Icons.archive),
            onTap: () => archiveConversation(conversation),
          ),
        ];
      },
    )
    ```
  </Tab>
</Tabs>

## Related

* [Message Template](/ui-kit/flutter/message-template) — Full template structure including options.
* [Message List](/ui-kit/flutter/message-list) — Option visibility properties.
* [Customization Overview](/ui-kit/flutter/customization-overview) — See all customization categories.
