Skip to content
API reference

components/chat-bubble

Import
import * as api from "@fungi.computer/caps/components/chat-bubble";
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”
Signature
type ChatBubbleSide = "agent" | "user";

Which side of the conversation a bubble sits on.


ChatBubbleStatetype alias

Section titled “ChatBubbleState”
Signature
type ChatBubbleState = "settled" | "pending" | "error";

pending is still being written; error is a turn that did not finish.


ChatBubblePropstype alias

Section titled “ChatBubbleProps”
Signature
type ChatBubbleProps = object &
Omit<HTMLAttributes<HTMLDivElement>, "children">;

Props accepted by ChatBubble.

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”
Signature
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.