Chat Thread
Scrolling chat thread for React that renders user, assistant and system messages as bubbles, auto scrolls to the newest one and uses a live log role.
src/registry/ui/chat-thread.tsx/r/chat-thread.json
Summarise churn for September.
Net churn fell to 1.8%, down 0.4 points. Most of the drop came from annual plans renewing early after the pricing change.
Thread
Installation#
bash
npx shadcn@latest add @minidev/chat-thread
MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/chat-thread.json
Usage#
tsx
import { ChatThread } from "@/components/ui/chat-thread"
export function Example() {
return (
<ChatThread
messages={[
{ id: "1", role: "user", content: "Build a pricing table" },
{
id: "2",
role: "assistant",
content: (
<>
Sure — here is a starter. <CitationChip className="ml-1">1</CitationChip>
</>
),
},
{ id: "3", role: "assistant", content: "Streaming response…", streaming: true },
]}
/>
)
}
API reference#
| Prop | Type | Default |
|---|---|---|
messages* | Msg[] | - |
className | string | - |
empty | React.ReactNode | - |
* required
Dependencies#
npm
React only
Built from
Examples#
Related ai chat components#
Agent TraceReact timeline of an AI agent run: each tool step shows pending, running, done or error, reports its duration and folds out details. The header sums up the run.Ai ComposerChat input for AI apps with a multiline textarea, Enter to send, suggestion chips, attach button, model picker and a stop button while a response streams.Artifact PreviewFramed preview for AI generated artifacts such as code, documents or UI, with a title bar, copy button and optional expand action for a full view.Attachment ChipCompact Tailwind file chip with a paperclip icon, truncated filename and an optional remove button, for attachments in chat composers, emails and forms.Citation ChipInline citation button for AI answers, with an accent source number and label. Link it to a source panel or popover so users can check references.Context ChipSmall toggle chip for picking context in AI prompts or filters, with an active accent state and hover styling. Passes through all native button props.
All AI chat UI components for React