# Streaming Response

> Assistant answer with completion actions and a sources slot.

Registry name: `streaming-response`. HTML docs: https://ui.anuragroy.dev/component/streaming-response.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/streaming-response.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/streaming-response.json`.

Registry JSON: https://ui.anuragroy.dev/r/streaming-response.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/streaming-response.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import {
  StreamingResponse,
  StreamingResponseAction,
  StreamingResponseActions,
  StreamingResponseContent,
  StreamingResponseSources
} from "@/components/ui/streaming-response"
```

## Usage

```tsx
import {
  StreamingResponse,
  StreamingResponseActions,
  StreamingResponseContent,
} from "@/components/ui/streaming-response"

export function Example() {
  return (
    <StreamingResponse>
      <StreamingResponseContent>
        <p>The dashboard should keep the sidebar persistent.</p>
      </StreamingResponseContent>
      <StreamingResponseActions />
    </StreamingResponse>
  )
}
```

## API

### StreamingResponse

Layout wrapper for an answer, actions, and sources.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | string | — |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/streaming-response): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/streaming-response.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
