Skip to main content

Where It Fits

CometChatCompactMessageComposer is a Widget that provides a streamlined, modern messaging input experience. It features a pill-shaped compose box with an inline rich text formatting toolbar, voice recording, attachments, mentions, and auxiliary actions like stickers. Compared to CometChatMessageComposer, the compact variant offers:
  • A rounded, pill-shaped input field
  • An inline rich text formatting toolbar displayed below the input
  • Configurable Enter key behavior (send message or new line)
  • Text selection context menu with formatting options
  • Inline audio recorder that replaces the compose box during recording

Minimal Render

The simplest way to render CometChatCompactMessageComposer:

Actions and Events

Callback Props

Component-level callbacks that fire on specific user interactions:

Rich Text Formatting

CometChatCompactMessageComposer includes built-in rich text formatting support with an inline toolbar displayed below the input field.

Configuration

Enter Key Behavior

Configure what happens when the Enter key is pressed using the enterKeyBehavior prop.

Custom View Slots

Customize the appearance of CometChatCompactMessageComposer by replacing default views with your own widgets.

Example: Custom Auxiliary Button View

Example: Custom Header View

Example: Custom Attachment Options

Styling

Customize the appearance of CometChatCompactMessageComposer using CometChatCompactMessageComposerStyle.

Style Properties

Nested Styles

Example: Custom Styling

Example: Custom Compose Box Styling

Example: Custom Rich Text Toolbar Style

Example: Custom Media Recorder Style

Advanced

Text Formatters

Assigns the list of text formatters. To configure the existing Mentions look and feel check out CometChatMentionsFormatter.

Mention Configuration

Custom Icons

Props Reference

Message Composer

The standard message composer component

Message Header

Display user or group details in the header

Message List

Display messages in a conversation

Mentions Formatter

Configure mentions look and feel