Streaming Text
Streamed answer with inline sources, actions, and follow-ups.
Installation
bun add elia@import "tailwindcss";
@import "@aile.sh/elia/styles/elia.css";
@source "../node_modules/@aile.sh/elia";Usage
import { StreamingText } from "@aile.sh/elia";
export function Example() {
return (
<StreamingText
text="Your churn risk is concentrated in the Starter tier — 61% of at-risk accounts joined in the last 90 days."
sources={[
{ name: "Usage Warehouse", domain: "warehouse.acme.dev", href: "https://warehouse.acme.dev" },
{ name: "Billing API", domain: "billing.acme.dev", href: "https://billing.acme.dev" },
]}
followUps={["Break risk down by plan", "Draft a win-back email"]}
onFollowUp={(prompt) => console.log("ask:", prompt)}
onAction={(action) => {
if (action === "copy") navigator.clipboard.writeText("…");
}}
/>
);
}— elia design system · MIT · primitives · https://github.com/aile-sh/elia