Skip to content
Back

Document extractionPro

Fields pulled from a document with confidence and page provenance: hover a field to see where it came from, review the low-confidence ones, then confirm.

oxyn add document-extraction
invoice-2026-114.pdf
VendorLumen Labs Ltd
Invoice numberINV-2026-114
Issue date2026-11-02
Due date2026-12-02
Subtotal$1,120.00
Tax$120.40
Total$1,240.40
Extracting 0 of 7
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

  • An agent answer is only as useful as the user's ability to check it, trust it, and continue from it.
  • Inline numbered citations with hover previews and a sources strip are now common; Perplexity loads source cards before the answer streams (note 04); follow-up / related chips and starter grids are everywhere.
  • The open gaps our research found are exactly where an agent kit should lead: memory transparency — only Le Chat shows "clickable receipts" (when, where from, why), ChatGPT shows "Memory updated", nobody shows a memory diff or "memory used" on an answer — and claim provenance (sourced vs inferred vs guessed), seen only in the assistant-ui catalogue.
  • This spec makes both first-class, with the same state discipline as the rest of Oxyn.

When not to use

Installation

Document extraction 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 document-extraction

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

Scan

Fields appear as the scan reaches them.

invoice-2026-114.pdf
VendorLumen Labs Ltd
Invoice numberINV-2026-114
Issue date2026-11-02
Due date2026-12-02
Subtotal$1,120.00
Tax$120.40
Total$1,240.40
Extracting 0 of 7
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

Review

Finished, two fields to review.

invoice-2026-114.pdf
VendorLumen Labs Ltd
Invoice numberINV-2026-114
Issue date2026-11-02
Due date2026-12-02
Subtotal$1,120.00
Tax$120.40
Total$1,240.40
2 to review
98%
96%
91%
74%
88%
63%
94%
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

Strict

A stricter threshold (Oxyn plus).

invoice-2026-114.pdf
VendorLumen Labs Ltd
Invoice numberINV-2026-114
Issue date2026-11-02
Due date2026-12-02
Subtotal$1,120.00
Tax$120.40
Total$1,240.40
5 to review
98%
96%
91%
74%
88%
63%
94%
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

DocumentExtraction

PropTypeDefaultDescription
documentString"invoice-2026-114.pdf"Document name.
fieldsrequiredVec<Field>—Fields.
elapsed_msu64u64::MAXms since the scan started.
step_msu64450ms per field.
thresholdf320.8Review threshold 0–1.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabFields, Looks right, Confirm all

Accessibility

  • Confidence has a label in percent, not just a bar.
  • Fields are labelled inputs with their page.
From the spec
  • Citation marker: a link-styled button, name "Citation 1: nature.com, ‘Title…’" (domain + title when resolved); aria-describedby the preview when open; preview is a non-modal dialog (role="dialog", labelled by the source title) reachable with Tab from the marker and closed with Esc; focus returns to the marker. Hover-only content is also available on focus (WCAG 1.4.13: dismissible, hoverable, persistent).
  • Sources list: role="list"; cards are links with "Source 3 of 10, cited" / "not cited"; filter is a radio group.
  • Searching: status updates via the composer live region at most every 10 s ("Found 6 sources").
  • Confidence: badge text is the accessible name ("Inferred claim"); glyph aria-hidden; colour never carries meaning alone.
  • Memory receipts: "Saved to memory: prefers metric units. Undo available for 10 seconds" announced politely once; Undo is a button; the 10 s window extends while the receipt has focus (WCAG 2.2.1 — proposed: timer pauses on focus/hover).
  • Follow-ups: role="group" labelled "Suggested follow-ups"; each chip a button; not announced on appearance (they are optional), but the group is the next Tab stop after the last message.
  • Empty state: greeting is a heading; starters are buttons in a group "Suggestions"; the composer keeps initial focus.
  • Contrast: markers ≥ 4.5:1 (they are text); dimmed uncited cards ≥ 4.5:1 for text; skeletons decorative (aria-hidden).
  • Reduced motion: §6 last row.

Motion & interaction

  • Marker resolve: Pending → Resolved opacity 60 → 100 % (120 ms).
  • Preview open: after delay.preview.open 300 ms; fade + scale 0.98 → 1 + y 4 → 0 (160 ms ease.out); the cited span inside the snippet gets a highlight sweep left → right (240 ms, once). Close after delay.preview.close 150 ms grace (moving the pointer from marker to card keeps it open). Moving between adjacent markers swaps content in place (120 ms crossfade, no close/open).
  • Marker ↔ card link: hovering a marker rings its card in the list/rail; hovering a card underlines its markers in the answer (both 120 ms).
  • Searching: cards fill one by one as results arrive: dur.row.enter 180 ms, stagger 40 ms, cap 5 (stack variant: favicons slide into the stack with −6 px overlap, 160 ms).
  • Stack → list expand: favicons spread into rows (200 ms spring.snap).
  • Re-order on done: cards glide to cited-first order (220 ms spring.snap).
  • Confidence tooltip: 300 ms delay, 120 ms fade.
  • Memory saved: chip enters with dur.row.enter; memory glyph does one 400 ms pulse (scale 1 → 1.15 → 1); Undo underline shrinks over 10 s (linear); Undone crossfade 160 ms then exit 200 ms.
  • Memory updated: before → after shown as strike-through fading out (300 ms) while new text fades in.
  • Follow-ups: appear 300 ms after Done; chips rise 6 px + fade (180 ms), stagger 40 ms, cap 5; on choose, the chip text flies to the composer (fill: 220 ms ease.in-out) or to the transcript (send: ≤ 260 ms, same as composer fly-up); the other chips fade out 120 ms.
  • Empty state: starters stagger in on mount (180 ms, 40 ms, cap 4); on first keystroke they fade (160 ms) and the area collapses (200 ms); on send the hero composer docks (Pro glass-hero, dur.travel 260 ms ease.in-out).
Timing
TransitionDurationDelayEasing / springStaggerFrame rate
Marker resolve120 ms0ease.out—60 Hz
Preview open / close160 / 120 ms300 ms / 150 ms graceease.out / ease.in—60 Hz
Snippet highlight sweep240 ms onceon openease.out—60 Hz
Preview content swap (adjacent markers)120 ms0ease.in-out—60 Hz
Marker ↔ card ring / underline120 ms0ease.out—60 Hz
Source card enter180 ms, y +4 → 0skeletons after 150 msease.out40 ms, cap 560 Hz
Stack → list200 ms0spring.snap—60 Hz
Re-order on done220 ms0 (held while hovered)spring.snap—60 Hz
Card highlight flash600 ms hold + 900 ms fade0ease.out—30 Hz
Confidence tooltip120 ms300 msease.out—60 Hz
Memory chip enter / glyph pulse180 / 400 ms0ease.out / spring.soft—60 Hz
Undo window10 000 ms underline0linear—15 Hz
Updated before → after300 ms0ease.in-out—60 Hz
Follow-ups enter180 ms, y +6 → 0300 ms after Doneease.out40 ms, cap 560 Hz
Follow-up chosen (fill / send)220 / ≤ 260 ms0ease.in-out / ease.in—60 Hz
Starters enter / fade on typing / collapse180 / 160 / 200 ms0ease.out / ease.in / spring.snap40 ms, cap 460 Hz
Hero composer dock (Pro)260 mson first sendease.in-out—60 Hz
Reduced motionall → 0–80 ms opacity crossfades; no sweeps, pulses, glides or staggers; previews still wait 300 ms (intent detection, not motion); Undo shown as "Undo (10 s)" text counting at 1 Hz; follow-ups and starters appear together—linearnoneon change

Responsive behaviour

  • Document and fields stack below 620 px of container.
Edge cases (spec)
  • Many citations (50+): markers stay inline; the list collapses to the stack with "50 sources"; numbers ≥ 10 widen the pill to the 2-digit reserved width (status-text ReserveMagnitude).
  • Citations streaming before sources resolve: Pending markers; if a marker never resolves by Done, it becomes Orphan (no broken link).
  • Duplicate sources: deduplicated by canonical URL; markers point to the single card.
  • Long titles / URLs: titles clamp at 2 lines; domains middle-truncate; full in the tooltip.
  • RTL: markers follow the claim at the logical end; numbers in bidi isolates; cards row scrolls from the right; favicon stack overlaps toward the inline-end.
  • Tiny sizes: citation/number at 10 px min font with a 24 px hit area (IDE) / 44 px (touch) via an invisible padded target; confidence-badge/icon for ≤ 16 px rows.
  • Dense IDE: source-list/list collapsed by default to "6 sources ›".
  • Touch: previews are tap-to-pin sheets; follow-up chips scroll horizontally when they would wrap past 2 rows.
  • Slow networks: source cards keep skeletons; favicons fall back to a monogram tile after 1 s.
  • Very fast agents: sources and answer land together — cards render settled, no fill animation.
  • Very slow searches: Searching(n) count and the status line carry liveness; skeletons stop sweeping after stall_soft and show "Still searching…".
  • Memory receipt on a branch: receipts belong to the version that created them; switching versions shows that version's receipts; Undo on an old version asks for confirmation (the memory may be used since).
  • Follow-ups after an error or interrupt: not shown (proposed); the message's Retry is the next step.
  • Empty state with a pre-filled draft (deep link): starters hidden, composer focused.
  • Starter text longer than the composer limit: rejected at authoring (codegen check, 2 000 chars).

Notes for AI

  • Import DocumentExtraction from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • There is no GPUI version yet; use the Dioxus component.
  • Props to set first: fields.
  • 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