# Docked Chat with Voice Orb

Docked AI chat panel for support or copilot sidebars: a voice orb header, a scrolling conversation with streaming cursor and Thinking status, and a composer at the foot. Comes with a scripted reply; wire useChatStream for live answers.

Block · Chat · https://01orbital.dev/docs/blocks/docked-chat-01

## Installation

```bash
npx shadcn@latest add @01orbital/docked-chat-01
```

## API reference

### ChatPanel

A chat panel to dock beside a page: a header with an orb and a title, the conversation, and a `ChatComposer` at the bottom. Before the first message it shows a short prompt. While a reply streams, the orb switches to its speaking motion and a "Thinking" status shows.

The panel fills its parent's height, so give the parent one. `className` and other props land on the outer `div`.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `turns` | `Turn[]` |  | The messages to show, in order. |
| `onSend` | `(value: string) => void` |  | Called with the message when the reader sends it. |
| `streaming?` | `boolean` | `false` | True while a reply is arriving: the last assistant turn shows a cursor, a status line ("Thinking" by default) appears, and the send button becomes a stop button. |
| `error?` | `string \| null` |  | A message shown in the conversation when something goes wrong. |
| `onStop?` | `(() => void)` |  | Called when the reader presses the stop button while a reply streams. |
| `onClose?` | `(() => void)` |  | Shows a close button in the header and is called when it is pressed. |
| `renderCitation?` | `((name: string) => React.ReactNode)` |  | Renders a cited item under a finished reply. It is called with each name the reply cites as `[[name]]`, two at most. |
| `title?` | `string` | `COPY.title` | The panel's heading, an `h2` in the header. |
| `emptyText?` | `string` | `COPY.body` | The prompt shown before the first message, in place of the default. |
| `status?` | `string` | `COPY.status` | The status line shown while a reply streams, "Thinking" by default. |
| `placeholder?` | `string` | `COPY.placeholder` | The composer's placeholder text, "Ask about the kit…" by default. |
| `palette?` | `OrbPaletteName \| VoiceOrbPalette` |  | The header orb's colors: a palette name from Orb Palettes, such as `tide`, `dusk` or `viridian`, or a `VoiceOrbPalette` of your own. Without it, the orb is scarlet over cobalt. |

## Make it yours

Named values at the top of `components/blocks/chat/docked-chat-01/index.tsx`: `COPY`, `SCRIPT`, `SAMPLE_REPLY`, `CITED`. Its words are in `COPY`.

## Built from

Built from these parts. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

- [Button](https://01orbital.dev/docs/components/button)
- [Card](https://01orbital.dev/docs/components/card)
- [Chat Composer](https://01orbital.dev/docs/components/chat-composer)
- [Chat Conversation](https://01orbital.dev/docs/components/chat-conversation)
- [Chat Inline Component Card](https://01orbital.dev/docs/components/chat-inline-component-card)
- [Chat Message](https://01orbital.dev/docs/components/chat-message)
- [Chat Response](https://01orbital.dev/docs/components/chat-response)
- [Eyebrow](https://01orbital.dev/docs/components/eyebrow)
- `font-geist-mono`
- [Message Scroller](https://01orbital.dev/docs/components/message-scroller)
- [Use Chat Stream](https://01orbital.dev/docs/components/use-chat-stream)
- [Voice Orb](https://01orbital.dev/docs/components/voice-orb)

The shadcn parts here are their Base UI versions, and this piece uses Base UI's API. A Radix version you already have won't work with it.

npm: `@phosphor-icons/react`, `cn`
