Streaming Status Bar
Header bar with pulsing status badge and optional pause or resume action for generative UI panels.
Default
Streaming and complete states with pause control
Streaming...
default-example.tsx
1"use client";23import { useState } from "react";4import { StreamingStatusBar } from "@/registry/ui/streaming-status-bar";56export function StreamingStatusBarDefaultExample() {7 const [isComplete, setIsComplete] = useState(false);8 const [isPaused, setIsPaused] = useState(false);910 return (11 <div className="w-full max-w-xl space-y-4">12 <StreamingStatusBar13 isComplete={isComplete}14 isPaused={isPaused}15 onTogglePause={() => setIsPaused((p) => !p)}16 />17 <div className="flex gap-2">18 <button19 type="button"20 className="rounded-md border px-3 py-1.5 text-sm"21 onClick={() => {22 setIsComplete(false);23 setIsPaused(false);24 }}25 >26 Streaming27 </button>28 <button29 type="button"30 className="rounded-md border px-3 py-1.5 text-sm"31 onClick={() => setIsComplete(true)}32 >33 Complete34 </button>35 </div>36 </div>37 );38}
Installation & source
Install via the shadcn CLI or copy the registry files manually.
bash
npx shadcn@latest add @tt-ui/streaming-status-bar
Props
| Name | Type | Default | Description |
|---|---|---|---|
| isComplete | boolean | Required | Whether streaming has finished |
| isPaused | boolean | false | Paused state for the action button label |
| onTogglePause | () => void | undefined | When set, shows pause/resume button |
| streamingLabel | string | "Streaming..." | Label while content is streaming |
| completeLabel | string | "Complete" | Label when streaming is done |