ChatInspectorLayout

The chat-with-an-inspector shape as a component: the chat area is children, the panel beside it is inspector or a list of panels rendered as tabs (activePanelId, onActivePanelIdChange). The pane is resizable and collapsible; opened and onOpenedChange drive the toggle in your header, and dragging the pane shut reports back through the same callback. Below breakpoint (900px of the layout width, or forced with compact) the inspector moves into a drawer — drawerPosition and drawerSize shape it. defaultSize, minChatWidth and minInspectorWidth control the split. The layout fills its parent, so give it a height — style={{ height: '100dvh' }} for a full-page chat — or the panes grow with the longest panel and the page scrolls instead of the transcript.

Getting Started
$pnpm add @sinups/ai-kit @mantine/core @mantine/hooks @tabler/icons-react
Examples
Beside the chat
Drawer on narrow screens
API reference
Prop
Type
Required
children
React.ReactNode
Yes
Chat area, usually `AgentChat` with a header above it
inspector
React.ReactNode
No
Inspector content; ignored when `panels` is set
panels
ChatInspectorPanel[]
No
Inspector panels rendered as tabs
activePanelId
string
No
Controlled active panel id
onActivePanelIdChange
(id: string) => void
No
Called when the user switches panels
opened
boolean
No
Controlled open state of the inspector
onOpenedChange
(opened: boolean) => void
No
Called when the inspector is opened or closed, including by dragging the pane shut
defaultOpened
boolean
No
Open state before the first change, `true` by default
breakpoint
number
No
Width in px below which the inspector moves into a drawer, `900` by default
compact
boolean
No
Forces the drawer instead of measuring the layout width
defaultSize
number
No
Share of the width taken by the inspector pane in percent, `38` by default
minChatWidth
SplitterPaneSize
No
Minimum width of the chat pane, `420px` by default
minInspectorWidth
SplitterPaneSize
No
Minimum width of the inspector pane, `360px` by default
drawerPosition
'bottom' | 'right'
No
Edge the drawer slides in from in compact mode, `bottom` by default
drawerSize
string
No
Drawer size in compact mode, `92%` by default
labels
Partial<ChatInspectorLayoutLabels>
No
Overrides of the default English labels
className
string
No
Class name added to the root element
style
React.CSSProperties
No
Inline styles added to the root element