Command Palette

Search for a command to run...

Docs
Voice Message Bubble

Voice Message Bubble

Chat-style voice message bubble with waveform visualization and playback controls

Loading...

Installation

Usage

import VoiceMessageBubble from "@/components/ruixen/voice-message-bubble";
 
export default function App() {
  return (
    <VoiceMessageBubble
      audioSrc="https://example.com/voice-message.mp3"
      duration={45}
      bubbleColor="#e3f2fd"
      waveColor="#1976d2"
    />
  );
}

Props

PropTypeDefaultDescription
audioSrcstring-URL of the voice message
durationnumber-Duration in seconds
bubbleColorstring"#fff"Background color of bubble
waveColorstring"#000"Color of waveform bars
classNamestring-Additional CSS classes

Features

  • Chat Bubble Design: Familiar messaging app appearance
  • Waveform Visualization: Animated waveform bars
  • Click to Seek: Click on waveform to jump to position
  • Play/Pause Control: Simple audio controls
  • Progress Overlay: Visual progress indication
  • Duration Display: Shows message length
  • Customizable Colors: Configurable bubble and wave colors

Styling

The component supports custom colors for both the bubble background and waveform:

<VoiceMessageBubble
  audioSrc="/voice.mp3"
  duration={30}
  bubbleColor="#dcf8c6" // WhatsApp green
  waveColor="#075e54" // Dark green
/>