Skip to content
Back

AI AnswerPro

Streamed answer with source cards, citation chips that preview their source, copy, regenerate, feedback and follow-ups.

oxyn add ai-answer

Which city should host the spring team retreat?

Reading 8 sources
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • A streamed answer that shows where it came from: the sources it read, citation chips that preview them, and the actions people take after reading – copy, regenerate, rate, follow up.

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

AI Answer 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.

Terminal
oxyn add ai-answer

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Default

The sources pop in ("Reading 8 sources"), the answer streams with a Stop button, then RELATED and the footer arrive.

Which city should host the spring team retreat?

Reading 8 sources
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Finished

Finished: point at a citation chip to preview every source it cites.

Which city should host the spring team retreat?

Answer

Porto suits the 14-person retreat best: compact, calm in the mornings and inside the budget you set.

  • Dates: 22–24 April works for everyone; two people join on day two.
  • Stay: two linked flats by the river come to 2,640 EUR for three nights, about 18% under the hotel.
  • Flights: direct flights from Berlin and Amsterdam land before 11:00, so day one can start after lunch.

Book the flats this week – only one April weekend is still open.

Related
Answered in 2.9s
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Feedback

Thumbs down: "What went wrong?" and the reason chips.

Which city should host the spring team retreat?

Answer

Porto suits the 14-person retreat best: compact, calm in the mornings and inside the budget you set.

  • Dates: 22–24 April works for everyone; two people join on day two.
  • Stay: two linked flats by the river come to 2,640 EUR for three nights, about 18% under the hotel.
  • Flights: direct flights from Berlin and Amsterdam land before 11:00, so day one can start after lunch.

Book the flats this week – only one April weekend is still open.

Related
What went wrong?
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Classic

Classic style: the source cards grouped in a grey band, a blue agent badge, arrows and a grey footer.

Which city should host the spring team retreat?

Answer

Porto suits the 14-person retreat best: compact, calm in the mornings and inside the budget you set.

  • Dates: 22–24 April works for everyone; two people join on day two.
  • Stay: two linked flats by the river come to 2,640 EUR for three nights, about 18% under the hotel.
  • Flights: direct flights from Berlin and Amsterdam land before 11:00, so day one can start after lunch.

Book the flats this week – only one April weekend is still open.

Related
Answered in 2.9s
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Oxyn ai answer

Extended: the answer with search, provenance and cited cards.

How should we fix the flaky token expiry test?

Searching 0 of 4
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

AnswerCard

PropTypeDefaultDescription
questionStringDefault::default()Question heading (the demo when empty).
sourcesVec<AnswerSource>Default::default()Sources; the first three are cards, the rest add to "+N".
moreusizeDefault::default()Sources beyond the list, counted in the "+N more" tile.
textStringDefault::default()Answer markup (see `AnswerDoc::parse`).
relatedVec<String>Default::default()Follow-up prompts under RELATED.
tookString"2.9s"Footer time, e.g. "3.4s".
autoplaybooltrueStream from the start (else show the finished answer).
wpsu6438Words a second.
reasonsVec<String>Default::default()Reasons offered after a thumbs-down.
voteStringDefault::default()Start with a thumbs-down and its reasons (`up`, `down` or empty).
nowrequiredClockMs—The clock.
styleStringDefault::default()`clean`, `classic`, or empty to follow `data-cstyle`.
on_actionEventHandler<(String, String)>—(`copy` | `regenerate` | `stop` | `vote` | `reason` | `follow-up`, detail).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabSource cards, citation chips, follow-ups, then the footer actions
Focus a chipOpens its source preview
EscCloses the preview

Accessibility

  • The answer is a polite live region, busy while it streams; the status line reads Reading, Writing or Answer.
  • Citation chips are buttons named "Source: <titles>" and describe their tooltip (role=tooltip) while it is open.
  • Thumbs are toggle buttons (aria-pressed); thumbs down is aria-expanded over the reason chips; Copied and the thanks are announced.

Responsive behaviour

  • Fills its container up to 640 px (480 in the demo); three source cards fit the row with a "+N" tile, two below 480 px, one below 340 px.
Edge cases (spec)

Up to 640 px; three cards and "+N", two below 480 px, one below 340 px; the tooltip stays inside the card (max 80% of it).

Notes for AI

  • Import AnswerCard from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AnswerCardEl in oxyn_gpui.
  • Props to set first: now.
  • 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.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI