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.

Support Chat
Hey! How can I help you today?
I need help setting up DS0 in my project.
Sure! First, install the package with npm install @ds0/react. Then import the components you need.
That was easy. Thanks! 🎉

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