Conversation Sidebar
Chat history rail with active state, timestamps, and a new-chat action.
ConversationSidebar ships with a full API table, a copyable example, and accessibility notes.
Installation
Install the package once, then import ConversationSidebar from its direct entry point or from the root.
pnpm add @agent-ui/reactimport { ConversationSidebar } from "@agent-ui/react/conversation-sidebar";Tailwind CSS v4 users: add @source "../node_modules/@agent-ui/react/src" to the global stylesheet so the library utilities are generated.
Usage
The example below is the same code that renders the preview. Copy it, swap in your own handlers, and ship.
import { ConversationSidebar } from "@agent-ui/react"; <ConversationSidebar conversations={conversations} activeId={activeId} onSelect={openConversation} onNew={newChat}/>API reference
Every prop ConversationSidebar accepts, its type, default, and behaviour.
| Name | Type | Default | Description |
|---|---|---|---|
| conversations | Conversation[] | — | History items with id, title, updatedAt. |
| activeId | string | — | Highlighted conversation. |
| onSelect | (conv: Conversation) => void | — | Selection callback. |
| onNew | () => void | — | New chat callback. |
| className | string | — | Merged onto the nav element. |
Accessibility
ConversationSidebar composes with MessageList, ChatShell, useChat, and the provider compose blocks. Browse the full reference or see all components in the gallery.
8 lines · copy-ready