Rendyn

Component library

189 components

Agent UI

Streaming Response

Streaming Response accepts rendered children and an explicit response status.

Interactive exampleReact Tailwind CSS

Practical React example

Display a response that grows during generation and gains actions when it is complete.

Before you copy and paste

Keep the example in the React rendering environment required by the imported component. Copy components/agents/streaming-response.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: clsx, lucide-react, motion, react, tailwind-merge.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Display a response that grows during generation and gains actions when it is complete

// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
'use client';

import { StreamingResponse, type StreamingResponseStatus } from '@/components/agents/streaming-response';

export function AssistantReply({ text, status, onRetry }: {
  text: string;
  status: StreamingResponseStatus;
  onRetry?: () => void;
}) {
  return (
    <StreamingResponse status={status} copyText={text} onRetry={onRetry}>
      <p className="whitespace-pre-wrap">{text}</p>
    </StreamingResponse>
  );
}

Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.

Keep transport state in the parent and provide plain copyText when rendered content differs from the text to copy. Connect retry to the request policy and manage feedback separately.

Customization

StreamingResponseProps.children
Required; ReactNode. Rendered response content. Pass plain text or the output of a Markdown renderer.
StreamingResponseProps.status
Optional; StreamingResponseStatus.
StreamingResponseProps.copyText
Optional; string. Plain-text value copied by the built-in copy action.
StreamingResponseProps.onCopy
Optional; () => void | Promise<void>. Overrides the built-in clipboard action.
StreamingResponseProps.onRetry
Optional; () => void.
StreamingResponseProps.sources
Optional; CitationItem[]. Optional sources shown as a compact footer disclosure after streaming.
StreamingResponseProps.sourcesOpen
Optional; boolean.
StreamingResponseProps.defaultSourcesOpen
Optional; boolean.
StreamingResponseProps.onSourcesOpenChange
Optional; (open: boolean) => void.
StreamingResponseProps.sourceIdPrefix
Optional; string.
StreamingResponseProps.feedback
Optional; StreamingResponseFeedback.
StreamingResponseProps.defaultFeedback
Optional; StreamingResponseFeedback.
StreamingResponseProps.onFeedbackChange
Optional; (feedback: StreamingResponseFeedback) => void.
StreamingResponseProps.announce
Optional; boolean. Set false when a surrounding conversation log announces streamed text.

Integration notes

  • Sanitize rich content and validate external links before rendering untrusted output.
  • Choose one announcement layer for streamed text so the transcript and response do not speak over each other.

Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP