About
Tabbed agent chat panel: a user prompt, step-by-step agent replies that stream in with their data source and duration, and a composer with keyboard send. All content comes through props; follows shadcn theme tokens in light and dark.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Chat Composer to your project and fits it to your theme.
Code
How Chat Composer is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import ChatComposer, { type ChatComposerMessage } from "@/components/ui/chat-composer";
/* all content lives here; the component only renders what it is given */
const MESSAGES: ChatComposerMessage[] = [
{
label: "Queried",
source: "Billing events",
duration: "4s",
body: "Pulled 90 days of subscription renewals across all plans.",
},
{
label: "Compared",
source: "Churn cohorts",
duration: "2s",
body: "Annual plans churn 3.1% vs 8.4% monthly, mostly in week one.",
},
];
export default function ChatComposerDemo() {
return (
<div className="flex min-h-[520px] w-full items-center justify-center bg-background p-8">
<ChatComposer
tabs={["Revenue", "Customers"]}
initialPrompt="Why did churn spike last quarter?"
messages={MESSAGES}
placeholder="Ask about a metric or tag a dataset with @"
onSend={(text) => console.log("send:", text)}
/>
</div>
);
}
















