components/chat-bubble
Type Aliases
Section titled “Type Aliases”ChatBubbleSide
Section titled “ChatBubbleSide”ChatBubbleSide =
"agent"|"user"
Which side of the conversation a bubble sits on.
ChatBubbleState
Section titled “ChatBubbleState”ChatBubbleState =
"settled"|"pending"|"error"
pending is still being written; error is a turn that did not finish.
ChatBubbleProps
Section titled “ChatBubbleProps”ChatBubbleProps =
object&Omit<HTMLAttributes<HTMLDivElement>>,"children">>
Props accepted by ChatBubble.
Type Declaration
Section titled “Type Declaration”side:
ChatBubbleSide
An agent speaks from the left with its mark; the person from the right.
avatar?
Section titled “avatar?”
optionalavatar?:ReactNode
A mark for an agent, drawn beside its bubble.
optionalname?:ReactNode
Who is speaking, on the line above the bubble.
optionaltime?:ReactNode
When it was said, or what the speaker is doing instead.
state?
Section titled “state?”
optionalstate?:ChatBubbleState
children?
Section titled “children?”
optionalchildren?:ReactNode
Variables
Section titled “Variables”ChatBubble
Section titled “ChatBubble”
constChatBubble:ForwardRefExoticComponent<object&Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &RefAttributes<HTMLDivElement>>>>
One turn of a conversation: who said it, when, and what. It owns the sides, the bubble and the still-writing dots; the caller owns the content.