Saurabh

Streaming Response

AI chats 80

About

A response surface for AI chat that shows streaming or completed text with copy, retry, and feedback actions plus an expandable list of sources.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Streaming Response to your project and fits it to your theme.

Code

How Streaming Response is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { StreamingResponse } from "@/components/ui/streaming-response";

const SOURCES = [
  {
    id: "motion-react",
    title: "Motion for React",
    domain: "motion.dev",
    url: "https://motion.dev/docs/react",
  },
  {
    id: "aria-busy",
    title: "ARIA live regions",
    domain: "developer.mozilla.org",
    url: "https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-busy",
  },
];

export default function StreamingResponseDemo() {
  return (
    <div className="mx-auto w-full max-w-xl p-6">
      <StreamingResponse
        status="complete"
        copyText="Paris is the capital of France. It has been the country's political and cultural center for centuries."
        onRetry={() => {}}
        sources={SOURCES}
      >
        <p>
          Paris is the capital of France. It has been the country's political
          and cultural center for centuries.
        </p>
      </StreamingResponse>
    </div>
  );
}

Dependencies

More by Saurabh

View all
  • BeUI Tilt Card

    BeUI Tilt Card

    406
  • BeUI Expandable Tabs

    BeUI Expandable Tabs

    394
  • Animated Sidebar

    Animated Sidebar

    350
  • BeUI File Upload

    BeUI File Upload

    320
  • BeUI Bouncy Accordion

    BeUI Bouncy Accordion

    232
  • Loader

    Loader

    231
  • BeUI Expanable Action Bar

    BeUI Expanable Action Bar

    225
  • BeUI Create Menu

    BeUI Create Menu

    212

More in AI chats

View all
  • Agent Chat

    Agent Chat

    21
  • AI Suggestions

    AI Suggestions

    27
  • Interactive LLM Token & Context Window Visualizer

    Interactive LLM Token & Context Window Visualizer

    30
  • AI Actions

    AI Actions

    372
  • Aquarium Prompt

    Aquarium Prompt

    223
  • Message Parts

    Message Parts

    11
  • AI SaaS Workflow Hero

    AI SaaS Workflow Hero

    36
  • AI Chat Composer

    AI Chat Composer

    22

Explore more

Part of beUi — browse the full library on 21st.dev.