mayurrawte

Streaming Text

AI chats 1

About

A set of pure-CSS text primitives for animating AI chat responses as they stream in — a blinking cursor, fade-in words/lines, and a shimmering skeleton loader.

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

Code

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

Usage.tsx

import {
  StreamingText,
  StreamingTextLine,
  StreamingTextSkeleton,
  StreamingTextSkeletonLine,
} from "@/components/ui/streaming-text";

export default function StreamingTextDemo() {
  return (
    <div className="flex flex-col gap-6 w-full max-w-lg">
      <div>
        <p className="text-xs text-muted-foreground mb-2">
          Streaming with cursor
        </p>
        <StreamingText>
          <StreamingTextLine style={{ animationDelay: "0s" }}>
            CSS cascade layers give you more control over specificity.
          </StreamingTextLine>
          <StreamingTextLine style={{ animationDelay: "0.2s" }}>
            They allow you to define explicit layers of specificity.
          </StreamingTextLine>
        </StreamingText>
      </div>

      <div>
        <p className="text-xs text-muted-foreground mb-2">Loading skeleton</p>
        <StreamingTextSkeleton>
          <StreamingTextSkeletonLine />
          <StreamingTextSkeletonLine />
          <StreamingTextSkeletonLine />
        </StreamingTextSkeleton>
      </div>
    </div>
  );
}

Dependencies

More by mayurrawte

View all
  • MCP Scope Inspector

    MCP Scope Inspector

    2
  • Feedback Buttons

    Feedback Buttons

    2
  • Tooltip

    Tooltip

    2
  • Skeleton

    Skeleton

    2
  • Accordion

    Accordion

    1
  • MCP Tool Call Card

    MCP Tool Call Card

  • MCP Resource Browser

    MCP Resource Browser

  • Dialog

    Dialog

More in AI chats

View all
  • AI Actions

    AI Actions

    353
  • AI Artifact

    AI Artifact

    13
  • Aquarium Prompt

    Aquarium Prompt

    117
  • AI Suggestions

    AI Suggestions

    21
  • Agent Chat

    Agent Chat

    21
  • Research Report

    Research Report

    7
  • Message With Header And Delivery Status

    Message With Header And Delivery Status

    62
  • Tool Web Fetch

    Tool Web Fetch

    5