Skip to content
Viewership Inquire
Astro UI

Streaming Text.

Streamed answer with inline citations, sources, actions and follow-ups.

AgentComponentNo dependencies Beautiful UI, MIT

.md

The trail pack guide is your fastest-growing page. Organic sessions are up 23% this month, and it converts 9 points better than the category page. ga4-sep.csv Gemini and Perplexity now cite it too.

GA4 sessions, September ga4-sep.csv
AI citations, weeks 36–41 geo-log.md
Customer survey nw-survey.pdf

Install

  1. Import the foundation once

    foundation.css holds the tokens every component reads.

    Layout.astro
    ---
    // src/layouts/Layout.astro
    import "../styles/foundation.css";
    ---
  2. Copy StreamingText.astro

    Paste into src/components/viewership/streaming-text/

  3. Use it

    Page.astro
    ---
    import StreamingText from "../components/viewership/streaming-text/StreamingText.astro";
    ---
    
    <StreamingText />

Props 7

PropTypeDefaultDescription
content string | ({ text: string } | { cite: number })[] · The answer. In a string, [n] cites sources[n - 1]; in tokens, cite is 0-based.
sources { name: string; domain: string; href?: string; image?: string }[] [] Cited sources. Without image, shows the first letter.
followUps string[] [] Shown when done. Click fires vs-streaming-text:follow-up.
labels Partial<{ sources; followUps; copy; regenerate; good; bad }> · Sources toggle, follow-ups heading and action button names.
autoplay boolean true Stream when in view. If false or reduced motion, show the full answer.
loop boolean true Restart after 3.4s (not while hovered or focused). Turn off in a real thread.
fill boolean false Fill the parent instead of 380px.

Source 1 file

Ported from Beautiful UI, MIT. Notices.