Skip to content

ChatMinimal Component ​

A minimal chat component without history sidebar.

Import ​

tsx
import { ChatMinimal } from "@cognipeer/chat-ui";

Usage ​

tsx
<ChatMinimal
  baseUrl="/api/agents"
  agentId="assistant"
/>

Props ​

ChatMinimalProps is Omit<ChatProps, "showHistory">: it takes every prop of Chat, and the history sidebar is always off. Everything else works as in Chat, including approvals and questions, uploads, usage limits, the portal experience (messageActions, feedback, exportMenu, ...), controllerRef and EmbedChat's building blocks. Props that only make sense with the sidebar (historyActions, renderHistoryHeader, renderHistoryFooter, enableMessageSearch, defaultHistoryOpen, showStatus, showAgentName) have no effect.

Connection ​

PropTypeDefaultDescription
baseUrlstring-Base URL for the agent server API (not needed with transport)
transportChatTransport-Another backend, see Transports
agentIdstringfirst agentID of the agent to chat with. Without it the agents are listed and a picker shows in the header when there are several
authorization, headers, getHeaders, fetch-Authentication and transport options
conversationIdstring-Open this conversation; otherwise a new one starts with the first message
streamingbooleantrueEnable streaming

Look ​

PropTypeDefaultDescription
theme"dark" | "light""dark"Theme mode (read when the chat mounts)
themeColorsChatTheme["colors"]-Custom colours, including the status colours
enableFileUploadbooleantrueEnable file uploads
classNamestring-Container class name

Without the sidebar a person cannot switch conversations: offer your own control that calls controllerRef.current?.newChat() (a ChatController handle), or change the conversationId prop (the chat loads that conversation whenever it changes).

Examples ​

Basic ​

tsx
<ChatMinimal
  baseUrl="/api/agents"
  agentId="assistant"
  theme="dark"
/>

Embedded in Page ​

tsx
function ProductPage() {
  return (
    <div className="flex">
      <main className="flex-1">
        {/* Product content */}
      </main>
      
      <aside className="w-96 h-screen border-l">
        <ChatMinimal
          baseUrl="/api/agents"
          agentId="product-helper"
          theme="light"
        />
      </aside>
    </div>
  );
}

With Fixed Conversation ​

tsx
<ChatMinimal
  baseUrl="/api/agents"
  agentId="assistant"
  conversationId="conv-123"
/>

Custom Styling ​

tsx
<ChatMinimal
  baseUrl="/api/agents"
  agentId="assistant"
  className="rounded-lg border"
  themeColors={{
    bgPrimary: "#1a1a2e",
    accentPrimary: "#e94560",
  }}
/>

When to Use ​

Use ChatMinimal when you:

  • Don't need conversation history
  • Are embedding chat in a larger UI
  • Want a simpler interface
  • Are building a widget

Use Chat when you:

  • Need conversation history
  • Want full-featured chat
  • Are building a standalone chat page

Studio · Pulse · Console · Agent SDK and more — the Cognipeer documentation hub