Skip to main content

Overview

CometChatVoiceNoteBubble renders audio messages that were recorded via the composer’s voice recorder. It renders using the CometChatAudioBubble waveform player (documented below), giving voice notes a compact play/pause + waveform UI. This bubble renders whenever an audio message carries audioType: "voice_note" in its metadata. Voice notes are always standalone — they never participate in batch grid layouts or multi-attachment grouping.
Routing logic. The audio plugin automatically routes messages based on metadata:
  • audioType: "voice_note"CometChatVoiceNoteBubble (this component)
  • No audioType (attached audio files) → Audio Bubble (CometChatAudiosBubble)
You don’t need to configure this — it’s handled automatically by the plugin system.
Key characteristics:
  • Waveform playback — play/pause, seekable progress bar, elapsed/total time
  • Always standalone — voice notes are never grouped or batched with other messages
  • Metadata-driven — only used when the message has audioType: "voice_note" in metadata
  • Waveform player — renders with the CometChatAudioBubble player and its CSS selectors
Live Preview — interact with the voice note bubble.Open in Storybook ↗

Usage


How Voice Notes Are Tagged

When a user records audio via the composer’s voice recorder, the UIKit stamps audioType: "voice_note" into the message metadata before sending:
Audio files attached via the attachment menu do not receive this tag — they render as the Audio Bubble (CometChatAudiosBubble) instead.

Props

message

The audio message (voice note). The bubble renders it with the CometChatAudioBubble waveform player. Required.

alignment

Override incoming/outgoing alignment. Defaults to sender-vs-logged-in-user.

textFormatters

Text formatters applied to any caption.

className

Additional CSS class applied to the root element.

The Waveform Player

Voice notes render with the CometChatAudioBubble waveform player — a compact single-audio player with play/pause controls, a waveform progress bar, elapsed/total time, and a download control. It self-extracts the audio attachment from the message, so it can also be used standalone to render a single audio waveform.
The player accepts the same core props — message (required), alignment, and className.
Attached audio files (not voice notes) render as stacked player cards via CometChatAudiosBubble — see the Audio Bubble page.

CSS Selectors

The voice note renders with the CometChatAudioBubble waveform player, which uses these selectors:

Next Steps

Audio Bubble

Batch-aware bubble for attached audio files

Message Composer

Voice recorder and multi-attachment staging

Image Bubble

Batch-aware image bubble with grid layouts

Message List

Multi-attachment batch grouping in the list