Prodular UI

AI

ResponseAI

Renders an assistant answer from markdown, with a caret and soft word fade while it streams and citations from the sources it used.

npx prodular-ui add response

Streaming

Pass the text received so far and streaming. Half written tables, bold and links render cleanly.

Markdown

Headings, lists, quotes, links, inline code and code blocks, tuned for reading at 15px.

Close checklist for October

Accruals are posted for 14 of 16 vendors. The two open ones are below, followed by the journal entry to book once the invoices arrive.

Still open

  1. Northbeam Logistics: invoice expected on October 28, estimate $38,200.
  2. Kestrel Analytics: usage true up, estimate $6,450. See the usage report.

Accrue at the estimate if the invoice is not in by day 3 of close, then reverse in November.

csv
date,account,debit,credit,memo
2026-10-31,6120 Freight,38200,,Northbeam October accrual
2026-10-31,2110 Accrued liabilities,,38200,Northbeam October accrual

Run close status --period 2026-10 to see what is left.

Anatomy

<Message from="assistant">  <MessageContent>    <Response streaming={status === "streaming"} sources={sources}>      {text}    </Response>  </MessageContent></Message>

Guidance

Use it when

  • For every assistant answer, streamed or loaded from history.
  • Inside Message from="assistant", after Reasoning and tool calls.

Avoid

  • Wrapping it in a card or bubble. Assistant text sits on the page so it reads like a document.
  • Long tables in chat. Over eight rows, link to a report instead.
  • Rendering user messages with it. Users write plain text, show it in a Bubble.

Rules for AI agents

Published in llms-full.txt and the registry, so coding agents follow them when they build with this component.

  • Pass the markdown as children and set streaming only while tokens are still arriving. Set it to false the moment the stream ends, so the caret disappears.
  • Never fake streaming for retrieved or cached content. Render history and saved answers with streaming={false}.
  • Pass the sources the model cited as sources. [1] style markers in the text become citation chips in that order. Do not invent sources.
  • Do not repair or buffer partial markdown yourself. Response closes open code fences, bold and links and holds back half written table rows.
  • Render Reasoning and tool calls before Response, never after it.
  • Do not add your own text size or prose classes. The type scale is set for reading.

API

Response

PropTypeDefaultDescription
childrenstringMarkdown with GitHub flavored tables, task lists and strikethrough.
streamingbooleanfalseShows the caret and repairs incomplete markdown.
animatebooleanstreamingFades new words in. Respects reduced motion.
sourcesSourceData[]Turns [n] markers into citation chips with a preview card.