Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Streaming Response

Preview

A streaming response can link directly to Motion's Vue guide while the rest of the answer continues to arrive.

The same response can preserve useful structure:

  • Links stay interactive as nearby text streams
  • Lists keep their spacing and hierarchy
  • Code remains readable without shifting the response

Set aria-busy while new content is still arriving.

const status = complete ? "ready" : "streaming";

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/streaming-response

Import the shared styles once in your application.

TSUsage
import StreamingResponse from '@/components/beui/agents/StreamingResponse.vue'
import '@/components/beui/styles.css'

API Reference

#default?
slot

Rendered response content. Pass plain text or the output of a Markdown renderer.

Default—
status?
"streaming" | "complete" | "error"
Defaultstreaming
copyText?
string

Plain-text value copied by the built-in copy action.

Default—
onCopy?
() => void | Promise<void>

Overrides the built-in clipboard action.

Default—
@retry?
() => void
Default—
sources?
CitationItem[]

Optional sources shown as a compact footer disclosure after streaming.

Default[]
v-model:sourcesOpen?
boolean
Defaultundefined
defaultSourcesOpen?
boolean
Defaultfalse
sourceIdPrefix?
string
Default—
v-model:feedback?
Feedback
Default—
defaultFeedback?
Feedback
Defaultnull
announce?
boolean

Set false when a surrounding conversation log announces streamed text.

Defaulttrue
showActions?
boolean

Hides the built-in completion actions without changing response status.

Defaulttrue
labels?
Labels

Override any built-in string. `{count}` fills `source` (one) and `sources` (many).

Default—
class?
string
Default—
contentClassName?
string
Default—
actionsClassName?
string
Default—
@feedback-change?
(value: Feedback) => void
Default—
@sources-open-change?
(value: boolean) => void
Default—

Composition

Keep response state inside the message surface while the outer row remains stable.

Message
└── MessageContent
    └── MessageBubble
        └── StreamingResponse

Note: Message places the response in a stable assistant row. Citations connects completed claims to supporting sources. Code Block renders structured source inside a rich response.

How it works

A response has two distinct phases: content is still arriving, then the answer becomes available for action. The layout should remain stable across that boundary while rich content continues to render normally.

Also on React Native. A reply that streams in, then settles with actions.(opens in a new tab)

Updated