Conversation
Scroll container for a chat thread. Stays pinned to the bottom while tokens stream and lets go when the user scrolls up.
Installation
pnpm dlx shadcn@latest add @jds/conversation
Usage
import {
Conversation,
ConversationContent,
ConversationScrollButton,
} from "@/components/ai/conversation"
<Conversation>
<ConversationContent>{/* messages */}</ConversationContent>
<ConversationScrollButton />
</Conversation>Examples
Empty state
How can I help?
Ask about orders, refunds or shipping.
API Reference
Conversation
| Prop | Type | Default |
|---|---|---|
bubblesWho gets a bubble. Applies to every Message inside. | "user" | "all" | "none" | "user" |
shapeBubble corners: a tail toward the speaker, fully round, or squarer. | "tail" | "round" | "square" | "tail" |
densitySpacing between and inside messages. Compact suits side panels. | "comfortable" | "compact" | "comfortable" |
ConversationEmpty
| Prop | Type | Default |
|---|---|---|
titleHeading shown before the first message. | string | "Start a conversation" |
descriptionSupporting text. | string | – |
iconOptional icon above the title. | ReactNode | – |