Skip to main content

Components

@distri/react ships the chat surface as one component, <Chat>, and also exports the pieces it is made of. Use the pieces when you want the agent to live somewhere other than a chat panel: a tool row in your own activity feed, an approval card in a modal, a workflow tracker in a sidebar.

Each page in this section shows one group of components running live in the page, followed by the code to use it and the props it takes.

GroupComponentsUse it for
Chat surfaceChatMessageList, StreamingTextRenderer, ThinkingRendererThe transcript itself
RenderersDiffView, TodosDisplayStructured content inside a message
Tool callsRichToolCard, MinimalToolRow, HttpToolCardShowing what the agent did
Human-in-the-loopInteractiveToolCardApprovals, forms and questions
Sub-tasks and workflowsSubTaskTree, WorkflowProgressMulti-agent runs and fixed pipelines
Context and filesystemContextChip, ContextUsagePanel, FileWorkspace, ScriptTestingPanelContext budget and browser files

Install​

npm install @distri/react @distri/core
// Once, at the root of your app
import '@distri/react/theme.css'; // colour tokens, override to match your brand
import '@distri/react/globals.css'; // the component styles

See Theming for the tokens you can override, and the React API reference for hooks and the full <Chat> prop list.

About the demos​

This site does not run a model. The demos on these pages either mount a component with fixed props, or replay a short scripted cassette through ReplayChat from @distri/react/replay, which renders the same components a live thread does. They make no network calls. Where a demo waits for you (an approval, a form), it really waits: click it.

From components to products​

The Gallery shows what these add up to when an agent drives your own UI through client-side tools: a 3D studio, a design canvas, a KYC / KYB onboarding form and a checkout. The guide to writing those tools is In-product tools.