Conversation
The Conversation component wraps messages and automatically scrolls to the bottom. Also includes a scroll button that appears when not at the bottom.
Start a conversation
Messages will appear here as the conversation progresses.
Installation
If you prefer using jsrepo, please install via the command below:
Props
Conversation
| Name | Type | Default |
|---|---|---|
class | string | |
initial | ScrollBehavior | 'smooth' |
resize | ScrollBehavior | 'smooth' |
children | Snippet | |
ref | HTMLDivElement | |
...restProps | HTMLAttributes<HTMLDivElement> | |
ConversationContent
| Name | Type | Default |
|---|---|---|
class | string | |
children | Snippet | |
ref | HTMLDivElement | |
...restProps | HTMLAttributes<HTMLDivElement> | |
ConversationEmptyState
| Name | Type | Default |
|---|---|---|
class | string | |
title | string | 'No messages yet' |
description | string | 'Start a conversation to see messages here' |
icon | Snippet | |
children | Snippet | |
ref | HTMLDivElement | |
...restProps | HTMLAttributes<HTMLDivElement> | |
ConversationScrollButton
| Name | Type | Default |
|---|---|---|
class | string | |
onclick | MouseEventHandler<HTMLButtonElement> | |
...restProps | ButtonProps | |