Chat
Full-featured chat interface with message history, template support, and media uploads. Automatically groups messages by date and shows template prompt when last message is > 24 hours old.Import
Props
Array of chat messages to display, grouped automatically by date
Available message templates shown when conversation is inactive (>24 hrs)
Callback fired when user sends a message, template, or uploads media
Shows loading spinner in input when true
Placeholder text for the input field
Custom styles for the container
ChatMessageProps
Unique identifier for the message
Message direction/sender type
Text content of the message
Timestamp when message was created
Delivery/read status of the message
Array of media attachments (images, audio)
User information for the message sender
Role attribute for the message container
TemplateProps
Unique identifier for the template
Template title
Template subtitle
Full template message content
SendData
Text message content
Template ID when using a template
Media attachment with base64 data and content type
Usage
Notes
- Messages are automatically grouped by date with date dividers
- Shows template prompt when last recipient message is >24 hours old
- Supports image and audio media attachments
- Auto-scrolls to bottom when new messages arrive
- Media uploads are converted to base64 before sending
- Input is disabled when templates are required (>24h inactive)