For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
30
Sponsor

Chat Conversation

Full chat conversation component with multiple message types.

S

Hey! Check out this new feature we just shipped

10:30 AM

Oh wow, that looks amazing! How long did it take to build?

10:31 AM
S
Here's a preview of the dashboard

Here's a preview of the dashboard

10:32 AM

This is incredible! The UI is so clean

10:33 AM

Installation

$ pnpm dlx shadcn@latest add @mcpcn/chat-conversation

Usage

import {
  ChatConversation,
  ChatConversationMessages,
} from "@/components/ui/chat-conversation";
<ChatConversation>
  <ChatConversationMessages />
</ChatConversation>

Composition

Use the following composition to build an ChatConversation:

ChatConversation
├── ChatConversationMessage
└── ChatConversationMessages

OpenUI Integration

Install the OpenUI React packages.

pnpm add @openuidev/react-lang zod

Add ChatConversation to a component library and map it to the installed component.

import { createLibrary, defineComponent } from "@openuidev/react-lang";
import { z } from "zod/v4";
 
import {
  ChatConversation,
  ChatConversationMessages,
} from "@/components/ui/chat-conversation";
 
const OpenUIChatConversation = defineComponent({
  name: "ChatConversation",
  description: "Full chat conversation component with multiple message types.",
  props: z.object({}),
  component: () => (
    <ChatConversation>
      <ChatConversationMessages />
    </ChatConversation>
  ),
});
 
export const chat_conversationLibrary = createLibrary({
  root: "ChatConversation",
  components: [OpenUIChatConversation],
});

For richer generated compositions, define the child primitives separately and connect them with .ref fields. See Defining Components in the OpenUI documentation.

json-render Integration

Install the json-render React packages.

pnpm add @json-render/core @json-render/react zod

Add ChatConversation to a component catalog and map it to the installed component.

import { defineCatalog } from "@json-render/core";
import { defineRegistry } from "@json-render/react";
import { schema } from "@json-render/react/schema";
import { z } from "zod";
 
import {
  ChatConversation,
  ChatConversationMessages,
} from "@/components/ui/chat-conversation";
 
export const catalog = defineCatalog(schema, {
  components: {
    ChatConversation: {
      props: z.object({}),
      description:
        "Full chat conversation component with multiple message types.",
    },
  },
});
 
export const { registry } = defineRegistry(catalog, {
  components: {
    ChatConversation: () => (
      <ChatConversation>
        <ChatConversationMessages />
      </ChatConversation>
    ),
  },
});

Use catalog.prompt() to constrain model output, then render the generated spec with the json-render React Renderer. See the json-render Quick Start for the provider and streaming setup.

API Reference

See the Base UI documentation for more information.