DS0
Components

ChatBubble

A chat interface with message bubbles, sender alignment, and optional input.

Overview

ChatBubble renders conversational message bubbles with left/right alignment for different senders. Includes timestamps, read receipts, and an optional input footer.

Usage

<ChatBubble
  messages={[
    { id: '1', content: 'Hello!', sender: 'user', timestamp: new Date() },
    { id: '2', content: 'Hi there!', sender: 'other', timestamp: new Date() },
  ]}
  onSend={handleSend}
/>

API Reference

PropTypeDefaultDescription
messagesChatMessage[][]Message list
onSend(message: string) => voidSend message handler
showInputbooleantrueShow message input
showTimestampsbooleantrueDisplay timestamps
ComponentWhen to Use Instead
CardStatic content display
ToastTemporary notifications

On this page