Streaming textPro
A streamed answer with inline sources, a stacked source list, actions and follow-ups.
oxyn add streaming-textThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- A streamed answer: words fade in at a pace with a caret, [n] markers become citation chips (the source's host, linking out) that pop in place; once done a “10 sources” button with stacked favicons lists the sources, actions appear (copy, good, bad, retry) and follow-up questions can be asked.
When not to use
- Prompt composer with model picker, voice input, app connections and approval request: use Chat Composer instead.
- The model menu of an AI chat: use Model Picker instead.
- The prompt box for an agent, in six layouts: use Composer instead.
Installation
Streaming text is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add streaming-textUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Streaming
Words fade in; citations pop in place.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Done
Sources, actions and follow-ups.
Mint chip is up 12% against last summer scoopdata.io with stronger weekend peaks, while search interest for gelato keeps climbing into July trends.google.com . Basket data shows mint chip sells best next to waffle cones marketbasket.io , so a bundle is worth testing.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Bare
Fast, no follow-ups.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
StreamingText
| Prop | Type | Default | Description |
|---|---|---|---|
streamrequired | Stream | — | The stream. |
nowrequired | ClockMs | — | Shared clock. |
sourcesrequired | Vec<Source> | — | Sources (1-based in `[n]` markers). |
source_count | Option<usize> | Default::default() | Total sources to report (defaults to `sources.len()`). |
followups | Vec<String> | Default::default() | Follow-up questions. |
on_follow | EventHandler<String> | — | A follow-up picked. |
on_retry | EventHandler<()> | — | Retry pressed. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Citations, sources, copy, good, bad, retry, follow-ups |
| Enter | Open sources / ask a follow-up |
Accessibility
- aria-busy while streaming; actions are named buttons; votes use aria-pressed.
From the spec
- aria-busy while streaming; named action buttons; votes use aria-pressed.
Motion & interaction
Timing
- Reduced motion: no rise, blur or stagger; labels and values swap instantly (slot reels land at once, the shimmer band stops and the text stays muted).
Responsive behaviour
- Fills its container; citation chips wrap with the text.
Edge cases (spec)
- Fills its container.
Notes for AI
- Import
StreamingTextfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - There is no GPUI version yet; use the Dioxus component.
- Props to set first:
stream,now,sources. - It reads a clock (
now) for live timers; pass one clock for the whole page rather than one per component. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.