API reference
components/chat-bubble
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/chat-bubble";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | ChatBubbleSide | Which side of the conversation a bubble sits on. |
| type alias | ChatBubbleState | pending is still being written; error is a turn that did not finish. |
| type alias | ChatBubbleProps | Props accepted by ChatBubble. |
| constant | ChatBubble | 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. |
ChatBubbleSidetype alias
Section titled “ChatBubbleSide”type ChatBubbleSide = "agent" | "user";Which side of the conversation a bubble sits on.
ChatBubbleStatetype alias
Section titled “ChatBubbleState”type ChatBubbleState = "settled" | "pending" | "error";pending is still being written; error is a turn that did not finish.
ChatBubblePropstype alias
Section titled “ChatBubbleProps”type ChatBubbleProps = object & Omit<HTMLAttributes<HTMLDivElement>, "children">;Props accepted by ChatBubble.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
side |
ChatBubbleSide |
An agent speaks from the left with its mark; the person from the right. |
avatar? |
ReactNode |
A mark for an agent, drawn beside its bubble. |
name? |
ReactNode |
Who is speaking, on the line above the bubble. |
time? |
ReactNode |
When it was said, or what the speaker is doing instead. |
state? |
ChatBubbleState |
- |
children? |
ReactNode |
- |
ChatBubbleconstant
Section titled “ChatBubble”const ChatBubble: 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.