ChatPanel
ProAssistant panel docked beside an app page: a header with optional conversation tabs and actions, a scrolling message thread, and an embedded Composer.
Pro component. ChatPanel is a paid component. It ships in @lusterui/react-pro, a .tgz you download from the site after purchase.
Usage
import { ChatMessage, ChatPanel, Composer, MessageActions } from "@lusterui/react-pro";
<ChatPanel
tabs={[
{ value: "planning", label: "Q4 planning" },
{ value: "signups", label: "Signups" },
]}
onNewChat={handleNewChat}
onHistory={handleHistory}
onClose={() => setOpen(false)}
composer={<Composer variant="embedded" placeholder="Ask a follow-up" onSend={handleSend} />}
>
<ChatMessage kind="user">Summarize last week’s signups.</ChatMessage>
<ChatMessage kind="assistant" actions={<MessageActions />}>
Signups rose to 412, up from 380.
</ChatMessage>
</ChatPanel>
Props
| Prop | Type | Default |
|---|---|---|
aria-label | string, name of the <aside> landmark. | 'Assistant' |
tabs | ChatPanelTab[], open conversations as pill tabs in the header row; omit for one conversation. | – |
tab / defaultTab / onTabChange | string / (value: string) => void, controlled or uncontrolled active conversation tab. | First tab |
onNewChat / onHistory | () => void, shows the "New chat" and "History" header buttons when provided. | – |
actions | ReactNode, extra ghost icon buttons in the header (e.g. a DropdownMenu trigger). | – |
children | ReactNode, scrolling message thread (ChatMessage, ToolCallCard, MessageActions). | – |
composer | ReactNode, embedded Composer slot (variant="embedded"). | – |
onClose | () => void, called when Escape is pressed anywhere inside the panel. | – |
autoFocus / returnFocus | boolean, moves focus to the composer on mount and returns focus to the trigger on unmount. | true |
threadLabel | string, accessible name of the role="log" thread region. | 'Conversation' |
When to use something else
- Long conversations and session history as the main task: build a full-page chat layout with ChatMessage and Composer.
- A detail panel for a selected record: use Drawer (do not open both at once).
Nucleo Icons, https://nucleoapp.com/. Copyright © Nucleo. Copyright notice. Component examples use Hugeicons free (Stroke Rounded), MIT License, Copyright (c) 2025 Hugeicons. License